From f947cebe15c6c56383d630e1f4e9f5fc6bd6332a Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 6 Mar 2015 16:59:32 -0500 Subject: [PATCH] remove ifdefs around BM_Factorial --- test/CMakeLists.txt | 2 +- test/benchmark_test.cc | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e7ec9dd0..392dfb59 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ endmacro(add_gtest_test) # Demonstration executable compile_benchmark_test(benchmark_test) -add_test(benchmark benchmark_test --benchmark_min_time=0.1 50) +add_test(benchmark benchmark_test --benchmark_min_time=0.1 51) add_test(benchmark_filter_simple benchmark_test --benchmark_filter=Calculate 16) add_test(benchmark_filter_suffix benchmark_test --benchmark_filter=Calculate* 16) add_test(benchmark_filter_regex_wildcard benchmark_test --benchmark_filter=.*Calculate.* 16) diff --git a/test/benchmark_test.cc b/test/benchmark_test.cc index 60bc0e96..0a3e48e6 100644 --- a/test/benchmark_test.cc +++ b/test/benchmark_test.cc @@ -24,11 +24,9 @@ namespace { -#if 0 // TODO(ericwf): Remove this or figure out its purpose. int BENCHMARK_NOINLINE Factorial(uint32_t n) { return (n == 1) ? 1 : n * Factorial(n - 1); } -#endif double CalculatePi(int depth) { double pi = 0.0; @@ -52,7 +50,6 @@ std::vector* test_vector = nullptr; } // end namespace -#if 0 // TODO(ericwf): Remove this or figure out its purpose. static void BM_Factorial(benchmark::State& state) { int fac_42 = 0; while (state.KeepRunning()) @@ -61,7 +58,6 @@ static void BM_Factorial(benchmark::State& state) { EXPECT_NE(fac_42, std::numeric_limits::max()); } BENCHMARK(BM_Factorial); -#endif static void BM_CalculatePiRange(benchmark::State& state) { double pi = 0.0; @@ -179,9 +175,7 @@ class TestReporter : public benchmark::internal::ConsoleReporter { int main(int argc, const char* argv[]) { benchmark::Initialize(&argc, argv); -#if 0 // TODO(ericwf): Remove this or figure out its purpose. assert(Factorial(8) == 40320); -#endif assert(CalculatePi(1) == 0.0); TestReporter test_reporter;