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

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

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 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
« no previous file with comments | « net/quic/crypto/quic_random.cc ('k') | net/quic/crypto/quic_server_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_random_test.cc
diff --git a/net/quic/crypto/quic_random_test.cc b/net/quic/crypto/quic_random_test.cc
deleted file mode 100644
index 431a22118da78e5063316f6bde0c3458d0b47c3f..0000000000000000000000000000000000000000
--- a/net/quic/crypto/quic_random_test.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/crypto/quic_random.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace net {
-namespace test {
-
-TEST(QuicRandomTest, RandBytes) {
- unsigned char buf1[16];
- unsigned char buf2[16];
- memset(buf1, 0xaf, sizeof(buf1));
- memset(buf2, 0xaf, sizeof(buf2));
- ASSERT_EQ(0, memcmp(buf1, buf2, sizeof(buf1)));
-
- QuicRandom* rng = QuicRandom::GetInstance();
- rng->RandBytes(buf1, sizeof(buf1));
- EXPECT_NE(0, memcmp(buf1, buf2, sizeof(buf1)));
-}
-
-TEST(QuicRandomTest, RandUint64) {
- QuicRandom* rng = QuicRandom::GetInstance();
- uint64_t value1 = rng->RandUint64();
- uint64_t value2 = rng->RandUint64();
- EXPECT_NE(value1, value2);
-}
-
-TEST(QuicRandomTest, Reseed) {
- char buf[1024];
- memset(buf, 0xaf, sizeof(buf));
-
- QuicRandom* rng = QuicRandom::GetInstance();
- rng->Reseed(buf, sizeof(buf));
-}
-
-} // namespace test
-} // namespace net
« no previous file with comments | « net/quic/crypto/quic_random.cc ('k') | net/quic/crypto/quic_server_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698