Index: net/quic/test_tools/quic_test_utils_test.cc |
diff --git a/net/quic/test_tools/quic_test_utils_test.cc b/net/quic/test_tools/quic_test_utils_test.cc |
index 6d4fb2766a6df531c13a152fcce648b7a30eeb5b..d522c8f53e5e76e6505e2de35be0b59351b05c70 100644 |
--- a/net/quic/test_tools/quic_test_utils_test.cc |
+++ b/net/quic/test_tools/quic_test_utils_test.cc |
@@ -37,5 +37,13 @@ TEST(QuicTestUtilsTest, QuicBandwidth) { |
""); |
} |
+// Ensure that SimpleRandom does not change its output for a fixed seed. |
+TEST(QuicTestUtilsTest, SimpleRandomStability) { |
+ SimpleRandom rng; |
+ rng.set_seed(UINT64_C(0x1234567800010001)); |
+ EXPECT_EQ(UINT64_C(14865409841904857791), rng.RandUint64()); |
+ EXPECT_EQ(UINT64_C(12139094019410129741), rng.RandUint64()); |
+} |
+ |
} // namespace test |
} // namespace net |