Index: net/spdy/spdy_test_utils.cc |
diff --git a/net/spdy/spdy_test_utils.cc b/net/spdy/spdy_test_utils.cc |
index a7cfc901fbd93ed3e24298a30043f02c05a53d43..8d46a6e957a428408da9c1382b30c815bd31b618 100644 |
--- a/net/spdy/spdy_test_utils.cc |
+++ b/net/spdy/spdy_test_utils.cc |
@@ -15,8 +15,10 @@ namespace net { |
namespace test { |
-std::string HexDumpWithMarks(const unsigned char* data, int length, |
- const bool* marks, int mark_length) { |
+std::string HexDumpWithMarks(const unsigned char* data, |
+ int length, |
+ const bool* marks, |
+ int mark_length) { |
static const char kHexChars[] = "0123456789abcdef"; |
static const int kColumns = 4; |
@@ -30,7 +32,7 @@ std::string HexDumpWithMarks(const unsigned char* data, int length, |
std::string hex; |
for (const unsigned char* row = data; length > 0; |
row += kColumns, length -= kColumns) { |
- for (const unsigned char *p = row; p < row + 4; ++p) { |
+ for (const unsigned char* p = row; p < row + 4; ++p) { |
if (p < row + length) { |
const bool mark = |
(marks && (p - data) < mark_length && marks[p - data]); |
@@ -44,7 +46,7 @@ std::string HexDumpWithMarks(const unsigned char* data, int length, |
} |
hex = hex + " "; |
- for (const unsigned char *p = row; p < row + 4 && p < row + length; ++p) |
+ for (const unsigned char* p = row; p < row + 4 && p < row + length; ++p) |
hex += (*p >= 0x20 && *p <= 0x7f) ? (*p) : '.'; |
hex = hex + '\n'; |
@@ -52,12 +54,11 @@ std::string HexDumpWithMarks(const unsigned char* data, int length, |
return hex; |
} |
-void CompareCharArraysWithHexError( |
- const std::string& description, |
- const unsigned char* actual, |
- const int actual_len, |
- const unsigned char* expected, |
- const int expected_len) { |
+void CompareCharArraysWithHexError(const std::string& description, |
+ const unsigned char* actual, |
+ const int actual_len, |
+ const unsigned char* expected, |
+ const int expected_len) { |
const int min_len = std::min(actual_len, expected_len); |
const int max_len = std::max(actual_len, expected_len); |
scoped_ptr<bool[]> marks(new bool[max_len]); |
@@ -73,14 +74,13 @@ void CompareCharArraysWithHexError( |
for (int i = min_len; i < max_len; ++i) { |
marks[i] = true; |
} |
- if (identical) return; |
- ADD_FAILURE() |
- << "Description:\n" |
- << description |
- << "\n\nExpected:\n" |
- << HexDumpWithMarks(expected, expected_len, marks.get(), max_len) |
- << "\nActual:\n" |
- << HexDumpWithMarks(actual, actual_len, marks.get(), max_len); |
+ if (identical) |
+ return; |
+ ADD_FAILURE() << "Description:\n" << description << "\n\nExpected:\n" |
+ << HexDumpWithMarks( |
+ expected, expected_len, marks.get(), max_len) |
+ << "\nActual:\n" |
+ << HexDumpWithMarks(actual, actual_len, marks.get(), max_len); |
} |
void SetFrameFlags(SpdyFrame* frame, |
@@ -116,7 +116,7 @@ void SetFrameLength(SpdyFrame* frame, |
break; |
case SPDY4: |
case SPDY5: |
- CHECK_GT(1u<<14, length); |
+ CHECK_GT(1u << 14, length); |
{ |
int32 wire_length = base::HostToNet16(static_cast<uint16>(length)); |
memcpy(frame->data(), |
@@ -129,7 +129,6 @@ void SetFrameLength(SpdyFrame* frame, |
} |
} |
- |
} // namespace test |
} // namespace net |