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

Unified Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
index c398d61e15358bacaa6236dd8b3b6eeb9da8511b..a327aee9a31d4ae908e0aeac703f41c399a388fd 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -196,6 +196,65 @@ TEST_F(GLES2ImplementationTest, Clear) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+TEST_F(GLES2ImplementationTest, ClearBufferfi) {
+ struct Cmds {
+ cmds::ClearBufferfi cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, 3, 4);
+
+ gl_->ClearBufferfi(GL_COLOR, 2, 3, 4);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ClearBufferfv) {
+ GLfloat data[4] = {0};
+ struct Cmds {
+ cmds::ClearBufferfvImmediate cmd;
+ GLfloat data[4];
+ };
+
+ for (int jj = 0; jj < 4; ++jj) {
+ data[jj] = static_cast<GLfloat>(jj);
+ }
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, &data[0]);
+ gl_->ClearBufferfv(GL_COLOR, 2, &data[0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ClearBufferiv) {
+ GLint data[4] = {0};
+ struct Cmds {
+ cmds::ClearBufferivImmediate cmd;
+ GLint data[4];
+ };
+
+ for (int jj = 0; jj < 4; ++jj) {
+ data[jj] = static_cast<GLint>(jj);
+ }
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, &data[0]);
+ gl_->ClearBufferiv(GL_COLOR, 2, &data[0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ClearBufferuiv) {
+ GLuint data[4] = {0};
+ struct Cmds {
+ cmds::ClearBufferuivImmediate cmd;
+ GLuint data[4];
+ };
+
+ for (int jj = 0; jj < 4; ++jj) {
+ data[jj] = static_cast<GLuint>(jj);
+ }
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, &data[0]);
+ gl_->ClearBufferuiv(GL_COLOR, 2, &data[0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
TEST_F(GLES2ImplementationTest, ClearColor) {
struct Cmds {
cmds::ClearColor cmd;

Powered by Google App Engine
This is Rietveld 408576698