Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: net/quic/test_tools/quic_test_utils_test.cc

Issue 2590313003: Use SHA-1 functions from BoringSSL directly. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/quic/test_tools/simulator/quic_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/quic/test_tools/simulator/quic_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698