diff options
author | martina.kollarova <martina.kollarova@intel.com> | 2015-09-30 01:40:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-30 08:41:14 +0000 |
commit | 073d384f03968f327fc2b38e4f5370fb57772370 (patch) | |
tree | e8f48de2b2af0647bd256542b6107c8f3f49c5e9 | |
parent | 049ed02b66a2a7478588dd09a70eb438b7286997 (diff) | |
download | chromium_src-073d384f03968f327fc2b38e4f5370fb57772370.zip chromium_src-073d384f03968f327fc2b38e4f5370fb57772370.tar.gz chromium_src-073d384f03968f327fc2b38e4f5370fb57772370.tar.bz2 |
Check if ids were inserted in gpu tests
BUG=None
Review URL: https://codereview.chromium.org/1368343002
Cr-Commit-Position: refs/heads/master@{#351520}
-rwxr-xr-x | gpu/command_buffer/build_gles2_cmd_buffer.py | 6 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_format_test_autogen.h | 36 |
2 files changed, 22 insertions, 20 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index d6d81ea..597f5259 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -6016,7 +6016,8 @@ TEST_P(%(test_name)s, %(name)sInvalidArgs) { f.write(" CheckBytesWrittenMatchesExpectedSize(\n") f.write(" next_cmd, sizeof(cmd) +\n") f.write(" RoundSizeToMultipleOfEntries(arraysize(ids) * 4u));\n") - f.write(" // TODO(gman): Check that ids were inserted;\n") + f.write(" EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd),\n") + f.write(" sizeof(ids)));\n") f.write("}\n") f.write("\n") @@ -6480,7 +6481,8 @@ TEST_P(%(test_name)s, %(name)sInvalidArgs) { f.write(" CheckBytesWrittenMatchesExpectedSize(\n") f.write(" next_cmd, sizeof(cmd) +\n") f.write(" RoundSizeToMultipleOfEntries(arraysize(ids) * 4u));\n") - f.write(" // TODO(gman): Check that ids were inserted;\n") + f.write(" EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd),\n") + f.write(" sizeof(ids)));\n") f.write("}\n") f.write("\n") diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h index 1856e65..62bff78 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h @@ -744,7 +744,7 @@ TEST_F(GLES2FormatTest, DeleteBuffersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteFramebuffersImmediate) { @@ -762,7 +762,7 @@ TEST_F(GLES2FormatTest, DeleteFramebuffersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteProgram) { @@ -790,7 +790,7 @@ TEST_F(GLES2FormatTest, DeleteRenderbuffersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteSamplersImmediate) { @@ -808,7 +808,7 @@ TEST_F(GLES2FormatTest, DeleteSamplersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteSync) { @@ -846,7 +846,7 @@ TEST_F(GLES2FormatTest, DeleteTexturesImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteTransformFeedbacksImmediate) { @@ -865,7 +865,7 @@ TEST_F(GLES2FormatTest, DeleteTransformFeedbacksImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DepthFunc) { @@ -1074,7 +1074,7 @@ TEST_F(GLES2FormatTest, GenBuffersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, GenerateMipmap) { @@ -1102,7 +1102,7 @@ TEST_F(GLES2FormatTest, GenFramebuffersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, GenRenderbuffersImmediate) { @@ -1120,7 +1120,7 @@ TEST_F(GLES2FormatTest, GenRenderbuffersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, GenSamplersImmediate) { @@ -1137,7 +1137,7 @@ TEST_F(GLES2FormatTest, GenSamplersImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, GenTexturesImmediate) { @@ -1154,7 +1154,7 @@ TEST_F(GLES2FormatTest, GenTexturesImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, GenTransformFeedbacksImmediate) { @@ -1172,7 +1172,7 @@ TEST_F(GLES2FormatTest, GenTransformFeedbacksImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, GetActiveAttrib) { @@ -3778,7 +3778,7 @@ TEST_F(GLES2FormatTest, GenQueriesEXTImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteQueriesEXTImmediate) { @@ -3796,7 +3796,7 @@ TEST_F(GLES2FormatTest, DeleteQueriesEXTImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, QueryCounterEXT) { @@ -3919,7 +3919,7 @@ TEST_F(GLES2FormatTest, GenVertexArraysOESImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteVertexArraysOESImmediate) { @@ -3937,7 +3937,7 @@ TEST_F(GLES2FormatTest, DeleteVertexArraysOESImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, IsVertexArrayOES) { @@ -4585,7 +4585,7 @@ TEST_F(GLES2FormatTest, GenValuebuffersCHROMIUMImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, DeleteValuebuffersCHROMIUMImmediate) { @@ -4604,7 +4604,7 @@ TEST_F(GLES2FormatTest, DeleteValuebuffersCHROMIUMImmediate) { CheckBytesWrittenMatchesExpectedSize( next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(arraysize(ids) * 4u)); - // TODO(gman): Check that ids were inserted; + EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } TEST_F(GLES2FormatTest, IsValuebufferCHROMIUM) { |