Commit Graph

13 Commits

Author SHA1 Message Date
Eric
25acf220a4 Refactor most usages of KeepRunning to use the perfered ranged-for. (#459)
Recently the library added a new ranged-for variant of the KeepRunning
loop that is much faster. For this reason it should be preferred in all
new code.

Because a library, its documentation, and its tests should all embody
the best practices of using the library, this patch changes all but a
few usages of KeepRunning() into for (auto _ : state).

The remaining usages in the tests and documentation persist only
to document and test behavior that is different between the two formulations.

Also note that because the range-for loop requires C++11, the KeepRunning
variant has not been deprecated at this time.
2017-10-17 12:17:02 -06:00
Dominic Hamon
1100e91907 Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
Eric Fiselier
9341d705a1 Change --benchmark_list_tests to respect the benchmark filter.
This behavior mirrors how GTest handles these two flags.
2016-05-24 00:42:11 -06:00
Eric Fiselier
e0de8171c6 Change RunSpecifiedBenchmarks to return the number of benchmarks run. Fixes #145 2016-05-23 23:35:09 -06:00
Anton Danielsson
6abd53777b Use stringstream instead of atoi to avoid sign error.
The sane thing here would be to use std::stoul but this is not available in the android-ndk...
2015-10-09 08:47:36 +02:00
Anton Danielsson
df0df4aba9 Fixed tests so they build on android.
- Added missing header to test/benchmark_test.cc
- Changed std::stoul to std::atol in test/filter_test.cc because of a
  limitation in the android-ndk (http://stackoverflow.com/questions/17950814/how-to-use-stdstoul-and-stdstoull-in-android)
2015-10-09 08:47:35 +02:00
Greg Miller
2463339d0b Updates Initialize() to work with an argv as 'char**' 2015-09-30 16:14:50 -04:00
Eric Fiselier
e97a96f9e7 redo filter test 2015-03-31 00:05:02 -04:00
Eric Fiselier
20f1c0e2a8 Apply reporter interface changes. Make report methods non-const and add a Finalize method. 2015-03-17 16:16:36 -04:00
Eric Fiselier
e45252e6f5 move ConsoleReporter out of internal namespace 2015-03-17 14:15:16 -04:00
Eric Fiselier
efe591015d address review comments 2015-03-17 12:31:46 -04:00
Eric Fiselier
66bf7c8f71 add floating point comparison warnings 2015-03-12 20:27:29 -04:00
Dominic Hamon
3b40f0a7a3 Add filter test, remove re test, and googletest deps 2015-03-09 20:30:14 -07:00