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

Unified Diff: net/websockets/websocket_frame_test.cc

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 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/websockets/websocket_frame_perftest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_frame_test.cc
diff --git a/net/websockets/websocket_frame_test.cc b/net/websockets/websocket_frame_test.cc
index 104bab51e2ac6e73e7da2dacd2030504b52b3a73..eca94f02647ee014efaad3bf84b21f65b64f6376 100644
--- a/net/websockets/websocket_frame_test.cc
+++ b/net/websockets/websocket_frame_test.cc
@@ -51,9 +51,9 @@ TEST(WebSocketFrameHeaderTest, FrameLengths) {
TEST(WebSocketFrameHeaderTest, FrameLengthsWithMasking) {
static const char kMaskingKey[] = "\xDE\xAD\xBE\xEF";
- COMPILE_ASSERT(arraysize(kMaskingKey) - 1 ==
- WebSocketFrameHeader::kMaskingKeyLength,
- incorrect_masking_key_size);
+ static_assert(
+ arraysize(kMaskingKey) - 1 == WebSocketFrameHeader::kMaskingKeyLength,
+ "incorrect masking key size");
struct TestCase {
const char* frame_header;
@@ -294,8 +294,8 @@ TEST(WebSocketFrameTest, MaskPayloadAlignment) {
"\x08\x12\x11\xcb\x73\x71\xf3\xc9\xcb\xf7\x34\x61\x1a\xb2\x46\x08"
"\xbf\x41\x62\xba\x96\x6f\xe0\xe9\x4d\xcc\xea\x90\xd5\x2b\xbc\x16"
};
- COMPILE_ASSERT(arraysize(kTestInput) == arraysize(kTestOutput),
- output_and_input_arrays_have_the_same_length);
+ static_assert(arraysize(kTestInput) == arraysize(kTestOutput),
+ "output and input arrays should have the same length");
scoped_ptr<char, base::AlignedFreeDeleter> scratch(
static_cast<char*>(
base::AlignedAlloc(kScratchBufferSize, kMaxVectorAlignment)));
« no previous file with comments | « net/websockets/websocket_frame_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698