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

Unified Diff: net/quic/quic_utils_test.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/quic_utils_test.cc
diff --git a/net/quic/quic_utils_test.cc b/net/quic/quic_utils_test.cc
index 0a0355f7d25df05e116580204f321cf68daad7d6..823659da8cafa76b514fe06765812b569ea7a26b 100644
--- a/net/quic/quic_utils_test.cc
+++ b/net/quic/quic_utils_test.cc
@@ -16,18 +16,15 @@ namespace {
// A test string and a hex+ASCII dump of the same string.
const unsigned char kString[] = {
- 0x00, 0x90, 0x69, 0xbd, 0x54, 0x00, 0x00, 0x0d,
- 0x61, 0x0f, 0x01, 0x89, 0x08, 0x00, 0x45, 0x00,
- 0x00, 0x1c, 0xfb, 0x98, 0x40, 0x00, 0x40, 0x01,
- 0x7e, 0x18, 0xd8, 0xef, 0x23, 0x01, 0x45, 0x5d,
- 0x7f, 0xe2, 0x08, 0x00, 0x6b, 0xcb, 0x0b, 0xc6,
- 0x80, 0x6e
-};
+ 0x00, 0x90, 0x69, 0xbd, 0x54, 0x00, 0x00, 0x0d, 0x61, 0x0f, 0x01,
+ 0x89, 0x08, 0x00, 0x45, 0x00, 0x00, 0x1c, 0xfb, 0x98, 0x40, 0x00,
+ 0x40, 0x01, 0x7e, 0x18, 0xd8, 0xef, 0x23, 0x01, 0x45, 0x5d, 0x7f,
+ 0xe2, 0x08, 0x00, 0x6b, 0xcb, 0x0b, 0xc6, 0x80, 0x6e};
const unsigned char kHexDump[] =
-"0x0000: 0090 69bd 5400 000d 610f 0189 0800 4500 ..i.T...a.....E.\n"
-"0x0010: 001c fb98 4000 4001 7e18 d8ef 2301 455d ....@.@.~...#.E]\n"
-"0x0020: 7fe2 0800 6bcb 0bc6 806e ....k....n\n";
+ "0x0000: 0090 69bd 5400 000d 610f 0189 0800 4500 ..i.T...a.....E.\n"
+ "0x0010: 001c fb98 4000 4001 7e18 d8ef 2301 455d ....@.@.~...#.E]\n"
+ "0x0020: 7fe2 0800 6bcb 0bc6 806e ....k....n\n";
TEST(QuicUtilsTest, StreamErrorToString) {
EXPECT_STREQ("QUIC_BAD_APPLICATION_PAYLOAD",
@@ -35,8 +32,7 @@ TEST(QuicUtilsTest, StreamErrorToString) {
}
TEST(QuicUtilsTest, ErrorToString) {
- EXPECT_STREQ("QUIC_NO_ERROR",
- QuicUtils::ErrorToString(QUIC_NO_ERROR));
+ EXPECT_STREQ("QUIC_NO_ERROR", QuicUtils::ErrorToString(QUIC_NO_ERROR));
}
TEST(QuicUtilsTest, StringToHexASCIIDumpArgTypes) {
@@ -45,13 +41,23 @@ TEST(QuicUtilsTest, StringToHexASCIIDumpArgTypes) {
const string input;
const string expected;
} tests[] = {
- { "", "", },
- { "A", "0x0000: 41 A\n", },
- { "AB", "0x0000: 4142 AB\n", },
- { "ABC", "0x0000: 4142 43 ABC\n", },
- { "original",
- "0x0000: 6f72 6967 696e 616c original\n", },
- };
+ {
+ "", "",
+ },
+ {
+ "A", "0x0000: 41 A\n",
+ },
+ {
+ "AB", "0x0000: 4142 AB\n",
+ },
+ {
+ "ABC", "0x0000: 4142 43 ABC\n",
+ },
+ {
+ "original",
+ "0x0000: 6f72 6967 696e 616c original\n",
+ },
+ };
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
EXPECT_EQ(tests[i].expected,
@@ -65,19 +71,15 @@ TEST(QuicUtilsTest, StringToHexASCIIDumpArgTypes) {
TEST(QuicUtilsTest, StringToHexASCIIDumpSuccess) {
EXPECT_EQ(string(reinterpret_cast<const char*>(kHexDump)),
- QuicUtils::StringToHexASCIIDump(
- string(reinterpret_cast<const char*>(kString), sizeof(kString))));
+ QuicUtils::StringToHexASCIIDump(string(
+ reinterpret_cast<const char*>(kString), sizeof(kString))));
}
TEST(QuicUtilsTest, TagToString) {
- EXPECT_EQ("SCFG",
- QuicUtils::TagToString(kSCFG));
- EXPECT_EQ("SNO ",
- QuicUtils::TagToString(kServerNonceTag));
- EXPECT_EQ("CRT ",
- QuicUtils::TagToString(kCertificateTag));
- EXPECT_EQ("CHLO",
- QuicUtils::TagToString(MakeQuicTag('C', 'H', 'L', 'O')));
+ EXPECT_EQ("SCFG", QuicUtils::TagToString(kSCFG));
+ EXPECT_EQ("SNO ", QuicUtils::TagToString(kServerNonceTag));
+ EXPECT_EQ("CRT ", QuicUtils::TagToString(kCertificateTag));
+ EXPECT_EQ("CHLO", QuicUtils::TagToString(MakeQuicTag('C', 'H', 'L', 'O')));
// A tag that contains a non-printing character will be printed as a decimal
// number.
EXPECT_EQ("525092931",

Powered by Google App Engine
This is Rietveld 408576698