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

Unified Diff: content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc

Issue 791923003: replace COMPILE_ASSERT with static_assert in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
index b5787e170b56852c5c2a4efc1082f564ffbf5ca8..0329e2ee9505d4a095f6ac43f44b4f690f650ea5 100644
--- a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
+++ b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
@@ -51,9 +51,9 @@ inline ptrdiff_t AddressDiff(const void* a, const void* b) {
// code can see both definitions so we do the validation here.
TEST_F(PepperGamepadHostTest, ValidateHardwareBuffersMatch) {
// Hardware buffer.
- COMPILE_ASSERT(sizeof(ppapi::ContentGamepadHardwareBuffer) ==
- sizeof(GamepadHardwareBuffer),
- gamepad_hardware_buffers_must_match);
+ static_assert(sizeof(ppapi::ContentGamepadHardwareBuffer) ==
+ sizeof(GamepadHardwareBuffer),
+ "gamepad hardware buffers must match");
ppapi::ContentGamepadHardwareBuffer ppapi_buf;
GamepadHardwareBuffer content_buf;
EXPECT_EQ(AddressDiff(&content_buf.sequence, &content_buf),
@@ -64,8 +64,8 @@ TEST_F(PepperGamepadHostTest, ValidateHardwareBuffersMatch) {
TEST_F(PepperGamepadHostTest, ValidateGamepadsMatch) {
// Gamepads.
- COMPILE_ASSERT(sizeof(ppapi::WebKitGamepads) == sizeof(blink::WebGamepads),
- gamepads_data_must_match);
+ static_assert(sizeof(ppapi::WebKitGamepads) == sizeof(blink::WebGamepads),
+ "gamepads data must match");
ppapi::WebKitGamepads ppapi_gamepads;
blink::WebGamepads web_gamepads;
EXPECT_EQ(AddressDiff(&web_gamepads.length, &web_gamepads),
@@ -84,8 +84,8 @@ TEST_F(PepperGamepadHostTest, ValidateGamepadsMatch) {
TEST_F(PepperGamepadHostTest, ValidateGamepadMatch) {
// Gamepad.
- COMPILE_ASSERT(sizeof(ppapi::WebKitGamepad) == sizeof(blink::WebGamepad),
- gamepad_data_must_match);
+ static_assert(sizeof(ppapi::WebKitGamepad) == sizeof(blink::WebGamepad),
+ "gamepad data must match");
ppapi::WebKitGamepad ppapi_gamepad;
blink::WebGamepad web_gamepad;
« no previous file with comments | « content/browser/renderer_host/input/web_input_event_util.cc ('k') | content/browser/renderer_host/websocket_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698