folly: fixup folly::Random FixedSeed test expectations on macOS
[folly.git] / folly / test / RandomTest.cpp
index cc576ae4995a2b09fc81394e76ee0d2b87a32543..d7c4f4a58ab988ac4a64b00bbbad1b069e0a3e17 100644 (file)
@@ -65,12 +65,14 @@ TEST(Random, FixedSeed) {
   // clang-format on
 
   ConstantRNG gen;
+
+  // Pick a constant random number...
+  auto value = Random::rand32(10, gen);
+
   // Loop to make sure it really is constant.
   for (int i = 0; i < 1024; ++i) {
     auto result = Random::rand32(10, gen);
-    // TODO: This is a little bit brittle; standard library changes could break
-    // it, if it starts implementing distribution types differently.
-    EXPECT_EQ(0, result);
+    EXPECT_EQ(value, result);
   }
 }