From 2eac6ea99fa5f177840043c3a32a38d24f460372 Mon Sep 17 00:00:00 2001 From: Ben Maurer Date: Tue, 25 Feb 2014 10:40:58 -0800 Subject: [PATCH] Fix random tests Summary: Was broken but didn't notice it in all the random test failures Test Plan: fbmake runtests Reviewed By: njormrod@fb.com FB internal diff: D1189113 --- folly/test/RandomTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/folly/test/RandomTest.cpp b/folly/test/RandomTest.cpp index 09aff3c8..dee97698 100644 --- a/folly/test/RandomTest.cpp +++ b/folly/test/RandomTest.cpp @@ -99,9 +99,11 @@ BENCHMARK(Random64Num) { doNotOptimizeAway(Random::rand64(100ul << 32)); } BENCHMARK(Random64OneIn) { doNotOptimizeAway(Random::oneIn(100)); } int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); google::ParseCommandLineFlags(&argc, &argv, true); - runBenchmarks(); - - return 0; + if (FLAGS_benchmark) { + folly::runBenchmarks(); + } + return RUN_ALL_TESTS(); } -- 2.34.1