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

Unified Diff: net/quic/core/crypto/aes_128_gcm_12_encrypter_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
« no previous file with comments | « net/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/core/crypto/cert_compressor_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
diff --git a/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc b/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
index 352c18c3cf6c473c29e6e5fed455a7445c5ff886..bf98368484d45297680e53e522a466c52767b50e 100644
--- a/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
+++ b/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "net/quic/core/quic_utils.h"
+#include "net/quic/platform/api/quic_test.h"
#include "net/quic/platform/api/quic_text_utils.h"
#include "net/quic/test_tools/quic_test_utils.h"
@@ -171,7 +172,9 @@ QuicData* EncryptWithNonce(Aes128Gcm12Encrypter* encrypter,
return new QuicData(ciphertext.release(), ciphertext_size, true);
}
-TEST(Aes128Gcm12EncrypterTest, Encrypt) {
+class Aes128Gcm12EncrypterTest : public QuicTest {};
+
+TEST_F(Aes128Gcm12EncrypterTest, Encrypt) {
for (size_t i = 0; i < arraysize(test_group_array); i++) {
SCOPED_TRACE(i);
const TestVector* test_vectors = test_group_array[i];
@@ -220,14 +223,14 @@ TEST(Aes128Gcm12EncrypterTest, Encrypt) {
}
}
-TEST(Aes128Gcm12EncrypterTest, GetMaxPlaintextSize) {
+TEST_F(Aes128Gcm12EncrypterTest, GetMaxPlaintextSize) {
Aes128Gcm12Encrypter encrypter;
EXPECT_EQ(1000u, encrypter.GetMaxPlaintextSize(1012));
EXPECT_EQ(100u, encrypter.GetMaxPlaintextSize(112));
EXPECT_EQ(10u, encrypter.GetMaxPlaintextSize(22));
}
-TEST(Aes128Gcm12EncrypterTest, GetCiphertextSize) {
+TEST_F(Aes128Gcm12EncrypterTest, GetCiphertextSize) {
Aes128Gcm12Encrypter encrypter;
EXPECT_EQ(1012u, encrypter.GetCiphertextSize(1000));
EXPECT_EQ(112u, encrypter.GetCiphertextSize(100));
« no previous file with comments | « net/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/core/crypto/cert_compressor_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698