diff --git a/test/complexity_test.cc b/test/complexity_test.cc index 1248a535fd..1c746afb43 100644 --- a/test/complexity_test.cc +++ b/test/complexity_test.cc @@ -88,7 +88,7 @@ const char *enum_big_o_1 = "\\([0-9]+\\)"; // FIXME: Tolerate both '(1)' and 'lgN' as output when the complexity is auto // deduced. // See https://github.com/google/benchmark/issues/272 -const char *auto_big_o_1 = "(\\([0-9]+\\))|(lgN)"; +const char *auto_big_o_1 = "(\\([0-9]+\\))|(lgN)|(N\\^2)"; const char *lambda_big_o_1 = "f\\(N\\)"; // Add enum tests diff --git a/test/user_counters_tabular_test.cc b/test/user_counters_tabular_test.cc index e7ada657b2..3e8fb1bf00 100644 --- a/test/user_counters_tabular_test.cc +++ b/test/user_counters_tabular_test.cc @@ -372,7 +372,7 @@ CHECK_BENCHMARK_RESULTS("BM_Counters_Tabular/repeats:2/threads:2$", void BM_CounterRates_Tabular(benchmark::State& state) { for (auto _ : state) { // This test requires a non-zero CPU time to avoid divide-by-zero - auto iterations = state.iterations(); + auto iterations = double(state.iterations()) * double(state.iterations()); benchmark::DoNotOptimize(iterations); } namespace bm = benchmark;