From: Ben Maurer Date: Tue, 25 Feb 2014 18:40:58 +0000 (-0800) Subject: Fix random tests X-Git-Tag: v0.22.0~679 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2eac6ea99fa5f177840043c3a32a38d24f460372;p=folly.git 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 --- 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(); }