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

Unified Diff: net/spdy/spdy_frame_reader_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/spdy/spdy_frame_reader_test.cc
diff --git a/net/spdy/spdy_frame_reader_test.cc b/net/spdy/spdy_frame_reader_test.cc
index c72e5bebac066b39e771f46c1641b9192e5bcfb8..92e3d1b3f185733c1a3d1674ff7dfe7c27cfe41f 100644
--- a/net/spdy/spdy_frame_reader_test.cc
+++ b/net/spdy/spdy_frame_reader_test.cc
@@ -15,10 +15,10 @@ namespace net {
TEST(SpdyFrameReaderTest, ReadUInt16) {
// Frame data in network byte order.
const uint16 kFrameData[] = {
- htons(1), htons(1<<15),
+ htons(1), htons(1 << 15),
};
- SpdyFrameReader frame_reader(reinterpret_cast<const char *>(kFrameData),
+ SpdyFrameReader frame_reader(reinterpret_cast<const char*>(kFrameData),
arraysize(kFrameData) * sizeof(uint16));
EXPECT_FALSE(frame_reader.IsDoneReading());
@@ -29,16 +29,16 @@ TEST(SpdyFrameReaderTest, ReadUInt16) {
EXPECT_TRUE(frame_reader.ReadUInt16(&uint16_val));
EXPECT_TRUE(frame_reader.IsDoneReading());
- EXPECT_EQ(1<<15, uint16_val);
+ EXPECT_EQ(1 << 15, uint16_val);
}
TEST(SpdyFrameReaderTest, ReadUInt32) {
// Frame data in network byte order.
const uint32 kFrameData[] = {
- htonl(1), htonl(1<<31),
+ htonl(1), htonl(1 << 31),
};
- SpdyFrameReader frame_reader(reinterpret_cast<const char *>(kFrameData),
+ SpdyFrameReader frame_reader(reinterpret_cast<const char*>(kFrameData),
arraysize(kFrameData) * sizeof(uint32));
EXPECT_FALSE(frame_reader.IsDoneReading());
@@ -49,19 +49,17 @@ TEST(SpdyFrameReaderTest, ReadUInt32) {
EXPECT_TRUE(frame_reader.ReadUInt32(&uint32_val));
EXPECT_TRUE(frame_reader.IsDoneReading());
- EXPECT_EQ(1u<<31, uint32_val);
+ EXPECT_EQ(1u << 31, uint32_val);
}
TEST(SpdyFrameReaderTest, ReadStringPiece16) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, 0x02, // uint16(2)
- 0x48, 0x69, // "Hi"
- 0x00, 0x10, // uint16(16)
- 0x54, 0x65, 0x73, 0x74,
- 0x69, 0x6e, 0x67, 0x2c,
- 0x20, 0x31, 0x2c, 0x20,
- 0x32, 0x2c, 0x20, 0x33, // "Testing, 1, 2, 3"
+ 0x00, 0x02, // uint16(2)
+ 0x48, 0x69, // "Hi"
+ 0x00, 0x10, // uint16(16)
+ 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2c,
+ 0x20, 0x31, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x33, // "Testing, 1, 2, 3"
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -80,13 +78,11 @@ TEST(SpdyFrameReaderTest, ReadStringPiece16) {
TEST(SpdyFrameReaderTest, ReadStringPiece32) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, 0x00, 0x00, 0x03, // uint32(3)
- 0x66, 0x6f, 0x6f, // "foo"
- 0x00, 0x00, 0x00, 0x10, // uint32(16)
- 0x54, 0x65, 0x73, 0x74,
- 0x69, 0x6e, 0x67, 0x2c,
- 0x20, 0x34, 0x2c, 0x20,
- 0x35, 0x2c, 0x20, 0x36, // "Testing, 4, 5, 6"
+ 0x00, 0x00, 0x00, 0x03, // uint32(3)
+ 0x66, 0x6f, 0x6f, // "foo"
+ 0x00, 0x00, 0x00, 0x10, // uint32(16)
+ 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2c,
+ 0x20, 0x34, 0x2c, 0x20, 0x35, 0x2c, 0x20, 0x36, // "Testing, 4, 5, 6"
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -105,7 +101,7 @@ TEST(SpdyFrameReaderTest, ReadStringPiece32) {
TEST(SpdyFrameReaderTest, ReadUInt16WithBufferTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, // part of a uint16
+ 0x00, // part of a uint16
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -118,7 +114,7 @@ TEST(SpdyFrameReaderTest, ReadUInt16WithBufferTooSmall) {
TEST(SpdyFrameReaderTest, ReadUInt32WithBufferTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, 0x00, 0x00, // part of a uint32
+ 0x00, 0x00, 0x00, // part of a uint32
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -137,8 +133,8 @@ TEST(SpdyFrameReaderTest, ReadUInt32WithBufferTooSmall) {
TEST(SpdyFrameReaderTest, ReadStringPiece16WithBufferTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, 0x03, // uint16(3)
- 0x48, 0x69, // "Hi"
+ 0x00, 0x03, // uint16(3)
+ 0x48, 0x69, // "Hi"
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -157,7 +153,7 @@ TEST(SpdyFrameReaderTest, ReadStringPiece16WithBufferTooSmall) {
TEST(SpdyFrameReaderTest, ReadStringPiece16WithBufferWayTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, // part of a uint16
+ 0x00, // part of a uint16
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -176,8 +172,8 @@ TEST(SpdyFrameReaderTest, ReadStringPiece16WithBufferWayTooSmall) {
TEST(SpdyFrameReaderTest, ReadStringPiece32WithBufferTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, 0x00, 0x00, 0x03, // uint32(3)
- 0x48, 0x69, // "Hi"
+ 0x00, 0x00, 0x00, 0x03, // uint32(3)
+ 0x48, 0x69, // "Hi"
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -196,7 +192,7 @@ TEST(SpdyFrameReaderTest, ReadStringPiece32WithBufferTooSmall) {
TEST(SpdyFrameReaderTest, ReadStringPiece32WithBufferWayTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x00, 0x00, 0x00, // part of a uint32
+ 0x00, 0x00, 0x00, // part of a uint32
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -214,8 +210,8 @@ TEST(SpdyFrameReaderTest, ReadStringPiece32WithBufferWayTooSmall) {
TEST(SpdyFrameReaderTest, ReadBytes) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x66, 0x6f, 0x6f, // "foo"
- 0x48, 0x69, // "Hi"
+ 0x66, 0x6f, 0x6f, // "foo"
+ 0x48, 0x69, // "Hi"
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));
@@ -235,7 +231,7 @@ TEST(SpdyFrameReaderTest, ReadBytes) {
TEST(SpdyFrameReaderTest, ReadBytesWithBufferTooSmall) {
// Frame data in network byte order.
const char kFrameData[] = {
- 0x01,
+ 0x01,
};
SpdyFrameReader frame_reader(kFrameData, arraysize(kFrameData));

Powered by Google App Engine
This is Rietveld 408576698