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

Unified Diff: net/dns/record_rdata_unittest.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/dns/record_rdata_unittest.cc
diff --git a/net/dns/record_rdata_unittest.cc b/net/dns/record_rdata_unittest.cc
index 90bac446e2eb1fe9c51d2951115bbea50bbe3205..b822422e3972797d6ca416d75be3d93235366860 100644
--- a/net/dns/record_rdata_unittest.cc
+++ b/net/dns/record_rdata_unittest.cc
@@ -22,25 +22,20 @@ TEST(RecordRdataTest, ParseSrvRecord) {
// These are just the rdata portions of the DNS records, rather than complete
// records, but it works well enough for this test.
- const uint8 record[] = {
- 0x00, 0x01,
- 0x00, 0x02,
- 0x00, 0x50,
- 0x03, 'w', 'w', 'w',
- 0x06, 'g', 'o', 'o', 'g', 'l', 'e',
- 0x03, 'c', 'o', 'm',
- 0x00,
- 0x01, 0x01,
- 0x01, 0x02,
- 0x01, 0x03,
- 0x04, 'w', 'w', 'w', '2',
- 0xc0, 0x0a, // Pointer to "google.com"
- };
+ const uint8
+ record
+ [] = {
+ 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x03, 'w', 'w',
+ 'w', 0x06, 'g', 'o', 'o', 'g', 'l', 'e', 0x03,
+ 'c', 'o', 'm', 0x00, 0x01, 0x01, 0x01, 0x02, 0x01,
+ 0x03, 0x04, 'w', 'w', 'w', '2', 0xc0, 0x0a, // Pointer to
+ // "google.com"
+ };
DnsRecordParser parser(record, sizeof(record), 0);
const unsigned first_record_len = 22;
- base::StringPiece record1_strpiece = MakeStringPiece(
- record, first_record_len);
+ base::StringPiece record1_strpiece =
+ MakeStringPiece(record, first_record_len);
base::StringPiece record2_strpiece = MakeStringPiece(
record + first_record_len, sizeof(record) - first_record_len);
@@ -71,7 +66,7 @@ TEST(RecordRdataTest, ParseARecord) {
// records, but it works well enough for this test.
const uint8 record[] = {
- 0x7F, 0x00, 0x00, 0x01 // 127.0.0.1
+ 0x7F, 0x00, 0x00, 0x01 // 127.0.0.1
};
DnsRecordParser parser(record, sizeof(record), 0);
@@ -92,10 +87,8 @@ TEST(RecordRdataTest, ParseAAAARecord) {
// records, but it works well enough for this test.
const uint8 record[] = {
- 0x12, 0x34, 0x56, 0x78,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x09 // 1234:5678::9A
+ 0x12, 0x34, 0x56, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09 // 1234:5678::9A
};
DnsRecordParser parser(record, sizeof(record), 0);
@@ -104,8 +97,7 @@ TEST(RecordRdataTest, ParseAAAARecord) {
record_obj = AAAARecordRdata::Create(record_strpiece, parser);
ASSERT_TRUE(record_obj != NULL);
- ASSERT_EQ("1234:5678::9",
- IPAddressToString(record_obj->address()));
+ ASSERT_EQ("1234:5678::9", IPAddressToString(record_obj->address()));
ASSERT_TRUE(record_obj->IsEqual(record_obj.get()));
}
@@ -116,12 +108,8 @@ TEST(RecordRdataTest, ParseCnameRecord) {
// These are just the rdata portions of the DNS records, rather than complete
// records, but it works well enough for this test.
- const uint8 record[] = {
- 0x03, 'w', 'w', 'w',
- 0x06, 'g', 'o', 'o', 'g', 'l', 'e',
- 0x03, 'c', 'o', 'm',
- 0x00
- };
+ const uint8 record[] = {0x03, 'w', 'w', 'w', 0x06, 'g', 'o', 'o',
+ 'g', 'l', 'e', 0x03, 'c', 'o', 'm', 0x00};
DnsRecordParser parser(record, sizeof(record), 0);
base::StringPiece record_strpiece = MakeStringPiece(record, sizeof(record));
@@ -140,12 +128,8 @@ TEST(RecordRdataTest, ParsePtrRecord) {
// These are just the rdata portions of the DNS records, rather than complete
// records, but it works well enough for this test.
- const uint8 record[] = {
- 0x03, 'w', 'w', 'w',
- 0x06, 'g', 'o', 'o', 'g', 'l', 'e',
- 0x03, 'c', 'o', 'm',
- 0x00
- };
+ const uint8 record[] = {0x03, 'w', 'w', 'w', 0x06, 'g', 'o', 'o',
+ 'g', 'l', 'e', 0x03, 'c', 'o', 'm', 0x00};
DnsRecordParser parser(record, sizeof(record), 0);
base::StringPiece record_strpiece = MakeStringPiece(record, sizeof(record));
@@ -164,11 +148,8 @@ TEST(RecordRdataTest, ParseTxtRecord) {
// These are just the rdata portions of the DNS records, rather than complete
// records, but it works well enough for this test.
- const uint8 record[] = {
- 0x03, 'w', 'w', 'w',
- 0x06, 'g', 'o', 'o', 'g', 'l', 'e',
- 0x03, 'c', 'o', 'm'
- };
+ const uint8 record[] = {0x03, 'w', 'w', 'w', 0x06, 'g', 'o', 'o',
+ 'g', 'l', 'e', 0x03, 'c', 'o', 'm'};
DnsRecordParser parser(record, sizeof(record), 0);
base::StringPiece record_strpiece = MakeStringPiece(record, sizeof(record));
@@ -192,13 +173,9 @@ TEST(RecordRdataTest, ParseNsecRecord) {
// These are just the rdata portions of the DNS records, rather than complete
// records, but it works well enough for this test.
- const uint8 record[] = {
- 0x03, 'w', 'w', 'w',
- 0x06, 'g', 'o', 'o', 'g', 'l', 'e',
- 0x03, 'c', 'o', 'm',
- 0x00,
- 0x00, 0x02, 0x40, 0x01
- };
+ const uint8 record[] = {0x03, 'w', 'w', 'w', 0x06, 'g', 'o',
+ 'o', 'g', 'l', 'e', 0x03, 'c', 'o',
+ 'm', 0x00, 0x00, 0x02, 0x40, 0x01};
DnsRecordParser parser(record, sizeof(record), 0);
base::StringPiece record_strpiece = MakeStringPiece(record, sizeof(record));
@@ -218,5 +195,4 @@ TEST(RecordRdataTest, ParseNsecRecord) {
ASSERT_TRUE(record_obj->IsEqual(record_obj.get()));
}
-
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698