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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper_test.cc

Issue 817023003: replace COMPILE_ASSERT with static_assert in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « gpu/command_buffer/client/cmd_buffer_helper.h ('k') | gpu/command_buffer/client/share_group.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper_test.cc
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
index fe6888792349a88cef728a1265a4a834a0d35324..2e807e22a282e6ecda4cf9e60123471dafd196de 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -471,8 +471,8 @@ TEST_F(CommandBufferHelperTest, TestCommandProcessing) {
TEST_F(CommandBufferHelperTest, TestCommandWrapping) {
// Add num_commands * commands of size 3 through the helper to make sure we
// do wrap. kTotalNumCommandEntries must not be a multiple of 3.
- COMPILE_ASSERT(kTotalNumCommandEntries % 3 != 0,
- Is_multiple_of_num_command_entries);
+ static_assert(kTotalNumCommandEntries % 3 != 0,
+ "kTotalNumCommandEntries must not be a multiple of 3");
const int kNumCommands = (kTotalNumCommandEntries / 3) * 2;
CommandBufferEntry args1[2];
args1[0].value_uint32 = 5;
@@ -495,8 +495,8 @@ TEST_F(CommandBufferHelperTest, TestCommandWrapping) {
TEST_F(CommandBufferHelperTest, TestCommandWrappingExactMultiple) {
const int32 kCommandSize = kTotalNumCommandEntries / 2;
const size_t kNumArgs = kCommandSize - 1;
- COMPILE_ASSERT(kTotalNumCommandEntries % kCommandSize == 0,
- Not_multiple_of_num_command_entries);
+ static_assert(kTotalNumCommandEntries % kCommandSize == 0,
+ "kTotalNumCommandEntries should be a multiple of kCommandSize");
CommandBufferEntry args1[kNumArgs];
for (size_t ii = 0; ii < kNumArgs; ++ii) {
args1[ii].value_uint32 = ii + 1;
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.h ('k') | gpu/command_buffer/client/share_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698