Commit 0f78cebb by Lei Xu

Use #ifdef to protect calling Factorial in benchmark_test.cc

parent 7e290fb9
...@@ -171,7 +171,9 @@ class TestReporter : public benchmark::internal::ConsoleReporter { ...@@ -171,7 +171,9 @@ class TestReporter : public benchmark::internal::ConsoleReporter {
int main(int argc, const char* argv[]) { int main(int argc, const char* argv[]) {
benchmark::Initialize(&argc, argv); benchmark::Initialize(&argc, argv);
#ifdef DEBUG
assert(Factorial(8) == 40320); assert(Factorial(8) == 40320);
#endif
assert(CalculatePi(1) == 0.0); assert(CalculatePi(1) == 0.0);
TestReporter test_reporter; TestReporter test_reporter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment