Skip to content

Commit

Permalink
Fixes to tests to avoid conflicting names or main.
Browse files Browse the repository at this point in the history
pleroy authored and eggrobin committed May 24, 2021
1 parent ac99113 commit 9496c9c
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/args_product_test.cc
Original file line number Diff line number Diff line change
@@ -74,4 +74,6 @@ BENCHMARK_REGISTER_F(ArgsProductFixture, Empty)
->ArgsProduct({{1, 2}, {15}, {3, 7, 10}, {8, 9}})
->Args({4, 5, 6, 11});

#if !defined(_MSC_VER)
BENCHMARK_MAIN();
#endif
2 changes: 2 additions & 0 deletions test/internal_threading_test.cc
Original file line number Diff line number Diff line change
@@ -181,4 +181,6 @@ BENCHMARK(BM_MainThreadAndWorkerThread)
// ---------------------------- TEST CASES END ----------------------------- //
// ========================================================================= //

#if !defined(_MSC_VER)
int main(int argc, char* argv[]) { RunOutputTests(argc, argv); }
#endif
4 changes: 2 additions & 2 deletions test/link_main_test.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "benchmark/benchmark.h"

void BM_empty(benchmark::State& state) {
void BM_empty2(benchmark::State& state) {
for (auto _ : state) {
benchmark::DoNotOptimize(state.iterations());
}
}
BENCHMARK(BM_empty);
BENCHMARK(BM_empty2);

0 comments on commit 9496c9c

Please sign in to comment.