Skip to content

Commit eae05c2

Browse files
committed
Fixes to tests to avoid conflicting names or main.
1 parent 63ed68a commit eae05c2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

test/args_product_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ BENCHMARK_REGISTER_F(ArgsProductFixture, Empty)
7474
->ArgsProduct({{1, 2}, {15}, {3, 7, 10}, {8, 9}})
7575
->Args({4, 5, 6, 11});
7676

77+
#if !defined(_MSC_VER)
7778
BENCHMARK_MAIN();
79+
#endif

test/internal_threading_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,6 @@ BENCHMARK(BM_MainThreadAndWorkerThread)
181181
// ---------------------------- TEST CASES END ----------------------------- //
182182
// ========================================================================= //
183183

184+
#if !defined(_MSC_VER)
184185
int main(int argc, char* argv[]) { RunOutputTests(argc, argv); }
186+
#endif

test/link_main_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "benchmark/benchmark.h"
22

3-
void BM_empty(benchmark::State& state) {
3+
void BM_empty2(benchmark::State& state) {
44
for (auto _ : state) {
55
benchmark::DoNotOptimize(state.iterations());
66
}
77
}
8-
BENCHMARK(BM_empty);
8+
BENCHMARK(BM_empty2);

0 commit comments

Comments
 (0)