FBString: fix constructors so it compiles with newer Clang's
[folly.git] / folly / test / RandomTest.cpp
index e6f11f0379b22ca2a776d189273d9acd29e14251..e2586d80ce85a3ef86e007d92f59a44f953effa0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "folly/Random.h"
-#include "folly/Range.h"
-#include "folly/Benchmark.h"
-#include "folly/Foreach.h"
+#include <folly/Random.h>
+#include <folly/Range.h>
+#include <folly/Benchmark.h>
+#include <folly/Foreach.h>
 
 #include <glog/logging.h>
 #include <gtest/gtest.h>
@@ -36,7 +36,7 @@ TEST(Random, StateSize) {
   EXPECT_EQ(sizeof(uint_fast32_t) / 4 + 3,
             StateSize<std::minstd_rand0>::value);
   EXPECT_EQ(624, StateSize<std::mt19937>::value);
-#if FOLLY_USE_SIMD_PRNG
+#if FOLLY_HAVE_EXTRANDOM_SFMT19937
   EXPECT_EQ(624, StateSize<__gnu_cxx::sfmt19937>::value);
 #endif
   EXPECT_EQ(24, StateSize<std::ranlux24_base>::value);
@@ -51,7 +51,7 @@ TEST(Random, Simple) {
 }
 
 TEST(Random, MultiThreaded) {
-  const int n = 1024;
+  const int n = 100;
   std::vector<uint32_t> seeds(n);
   std::vector<std::thread> threads;
   for (int i = 0; i < n; ++i) {
@@ -113,7 +113,7 @@ BENCHMARK(Random64OneIn) { doNotOptimizeAway(Random::oneIn(100)); }
 
 int main(int argc, char** argv) {
   testing::InitGoogleTest(&argc, argv);
-  google::ParseCommandLineFlags(&argc, &argv, true);
+  gflags::ParseCommandLineFlags(&argc, &argv, true);
 
   if (FLAGS_benchmark) {
     folly::runBenchmarks();