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

Unified Diff: net/quic/core/crypto/quic_random_test.cc

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 8 months 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
Index: net/quic/core/crypto/quic_random_test.cc
diff --git a/net/quic/core/crypto/quic_random_test.cc b/net/quic/core/crypto/quic_random_test.cc
index d4f8a7bbd9bb2d98483157d3be285abf6e753b07..5d6f437d6e7ee3e731e5b27a7a2554924ef29bb0 100644
--- a/net/quic/core/crypto/quic_random_test.cc
+++ b/net/quic/core/crypto/quic_random_test.cc
@@ -4,12 +4,14 @@
#include "net/quic/core/crypto/quic_random.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#include "net/quic/platform/api/quic_test.h"
namespace net {
namespace test {
-TEST(QuicRandomTest, RandBytes) {
+class QuicRandomTest : public QuicTest {};
+
+TEST_F(QuicRandomTest, RandBytes) {
unsigned char buf1[16];
unsigned char buf2[16];
memset(buf1, 0xaf, sizeof(buf1));
@@ -21,14 +23,14 @@ TEST(QuicRandomTest, RandBytes) {
EXPECT_NE(0, memcmp(buf1, buf2, sizeof(buf1)));
}
-TEST(QuicRandomTest, RandUint64) {
+TEST_F(QuicRandomTest, RandUint64) {
QuicRandom* rng = QuicRandom::GetInstance();
uint64_t value1 = rng->RandUint64();
uint64_t value2 = rng->RandUint64();
EXPECT_NE(value1, value2);
}
-TEST(QuicRandomTest, Reseed) {
+TEST_F(QuicRandomTest, Reseed) {
char buf[1024];
memset(buf, 0xaf, sizeof(buf));
« no previous file with comments | « net/quic/core/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/core/crypto/strike_register_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698