diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index 509eeb8e27..c00b415aad 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -566,7 +566,6 @@ inline BENCHMARK_ALWAYS_INLINE } #endif - #elif defined(_MSC_VER) template BENCHMARK_DEPRECATED_MSG( @@ -630,7 +629,7 @@ class Counter { Counter(double v = 0., Flags f = kDefaults, OneK k = kIs1000) : value(v), flags(f), oneK(k) {} - BENCHMARK_ALWAYS_INLINE operator double const &() const { return value; } + BENCHMARK_ALWAYS_INLINE operator double const&() const { return value; } BENCHMARK_ALWAYS_INLINE operator double&() { return value; } }; @@ -681,8 +680,7 @@ class ThreadTimer; class ThreadManager; class PerfCountersMeasurement; -enum AggregationReportMode : unsigned -{ +enum AggregationReportMode : unsigned { // The mode has not been manually specified ARM_Unspecified = 0, // The mode is user-specified. @@ -697,8 +695,7 @@ enum AggregationReportMode : unsigned ARM_FileReportAggregatesOnly | ARM_DisplayReportAggregatesOnly }; -enum Skipped : unsigned -{ +enum Skipped : unsigned { NotSkipped = 0, SkippedWithMessage, SkippedWithError @@ -1019,7 +1016,7 @@ inline BENCHMARK_ALWAYS_INLINE bool State::KeepRunningInternal(IterationCount n, } struct State::StateIterator { - struct BENCHMARK_UNUSED Value {}; + struct BENCHMARK_UNUSED Value{}; typedef std::forward_iterator_tag iterator_category; typedef Value value_type; typedef Value reference; @@ -1526,15 +1523,15 @@ class Fixture : public internal::Benchmark { "/" #test_case_name, \ [](::benchmark::State& st) { func(st, __VA_ARGS__); }))) -#define BENCHMARK_PRIVATE_DECLARE_F(BaseClass, Method) \ - class BaseClass##_##Method##_Benchmark : public BaseClass { \ - public: \ - BaseClass##_##Method##_Benchmark() { \ - this->SetName(#BaseClass "/" #Method); \ - } \ - \ - protected: \ - void BenchmarkCase(::benchmark::State&) override; \ +#define BENCHMARK_PRIVATE_DECLARE_F(BaseClass, Method) \ + class BaseClass##_##Method##_Benchmark : public BaseClass { \ + public: \ + BaseClass##_##Method##_Benchmark() { \ + this->SetName(#BaseClass "/" #Method); \ + } \ + \ + protected: \ + void BenchmarkCase(::benchmark::State&) override; \ }; #define BENCHMARK_TEMPLATE1_PRIVATE_DECLARE_F(BaseClass, Method, a) \ @@ -1545,7 +1542,7 @@ class Fixture : public internal::Benchmark { } \ \ protected: \ - void BenchmarkCase(::benchmark::State&) override; \ + void BenchmarkCase(::benchmark::State&) override; \ }; #define BENCHMARK_TEMPLATE2_PRIVATE_DECLARE_F(BaseClass, Method, a, b) \ @@ -1556,7 +1553,7 @@ class Fixture : public internal::Benchmark { } \ \ protected: \ - void BenchmarkCase(::benchmark::State&) override; \ + void BenchmarkCase(::benchmark::State&) override; \ }; #define BENCHMARK_TEMPLATE_PRIVATE_DECLARE_F(BaseClass, Method, ...) \ @@ -1567,7 +1564,7 @@ class Fixture : public internal::Benchmark { } \ \ protected: \ - void BenchmarkCase(::benchmark::State&) override; \ + void BenchmarkCase(::benchmark::State&) override; \ }; #define BENCHMARK_DEFINE_F(BaseClass, Method) \ diff --git a/test/BUILD b/test/BUILD index c31810826d..5d0e84a75d 100644 --- a/test/BUILD +++ b/test/BUILD @@ -15,7 +15,7 @@ TEST_COPTS = [ "-Wconversion", "-Wextra", "-Wshadow", - # "-Wshorten-64-to-32", +#"-Wshorten-64-to-32", "-Wfloat-equal", "-fstrict-aliasing", ## assert() are used a lot in tests upstream, which may be optimised out leading to @@ -24,7 +24,7 @@ TEST_COPTS = [ "-Werror=old-style-cast", ] -# Some of the issues with DoNotOptimize only occur when optimization is enabled +#Some of the issues with DoNotOptimize only occur when optimization is enabled PER_SRC_COPTS = { "donotoptimize_test.cc": ["-O3"], } @@ -54,7 +54,7 @@ cc_library( ], ) -# Tests that use gtest. These rely on `gtest_main`. +#Tests that use gtest.These rely on `gtest_main`. [ cc_test( name = test_src[:-len(".cc")], @@ -74,7 +74,7 @@ cc_library( for test_src in glob(["*_gtest.cc"]) ] -# Tests that do not use gtest. These have their own `main` defined. +#Tests that do not use gtest.These have their own `main` defined. [ cc_test( name = test_src[:-len(".cc")], @@ -90,9 +90,9 @@ cc_library( "//:benchmark", "//:benchmark_internal_headers", ], - # FIXME: Add support for assembly tests to bazel. - # See Issue #556 - # https://github.com/google/benchmark/issues/556 +#FIXME : Add support for assembly tests to bazel. +#See Issue #556 +#https: // github.com/google/benchmark/issues/556 ) for test_src in glob( ["*_test.cc"], diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 00ac3dc923..521a79fda1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Enable the tests +#Enable the tests set(THREADS_PREFER_PTHREAD_FLAG ON)