Commit 1f679cc6 by Yunchao He Committed by Commit Bot

Code refactoring for angle::BitSet and EXPECT_GL_TRUE/FALSE.

This change refactors two style issues to make it be consistent. 1) This CL uses "using" to replace "typedef" for all angle::BitSet<...>. 2) This CL uses EXPECT_GL_TRUE/FALSE to replace EXPECT_EQ for bool comparison. BUG=angleproject:2005 Change-Id: I4afad92313ea2457bbfedf80f917a5873d7f29ee Reviewed-on: https://chromium-review.googlesource.com/795871 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 035419fa
...@@ -295,7 +295,7 @@ class Framebuffer final : public LabeledObject, public OnAttachmentDirtyReceiver ...@@ -295,7 +295,7 @@ class Framebuffer final : public LabeledObject, public OnAttachmentDirtyReceiver
DIRTY_BIT_MAX = DIRTY_BIT_UNKNOWN DIRTY_BIT_MAX = DIRTY_BIT_UNKNOWN
}; };
typedef angle::BitSet<DIRTY_BIT_MAX> DirtyBits; using DirtyBits = angle::BitSet<DIRTY_BIT_MAX>;
bool hasAnyDirtyBit() const { return mDirtyBits.any(); } bool hasAnyDirtyBit() const { return mDirtyBits.any(); }
void syncState(const Context *context); void syncState(const Context *context);
......
...@@ -426,13 +426,13 @@ class State : public OnAttachmentDirtyReceiver, angle::NonCopyable ...@@ -426,13 +426,13 @@ class State : public OnAttachmentDirtyReceiver, angle::NonCopyable
DIRTY_OBJECT_MAX = DIRTY_OBJECT_UNKNOWN, DIRTY_OBJECT_MAX = DIRTY_OBJECT_UNKNOWN,
}; };
typedef angle::BitSet<DIRTY_BIT_MAX> DirtyBits; using DirtyBits = angle::BitSet<DIRTY_BIT_MAX>;
const DirtyBits &getDirtyBits() const { return mDirtyBits; } const DirtyBits &getDirtyBits() const { return mDirtyBits; }
void clearDirtyBits() { mDirtyBits.reset(); } void clearDirtyBits() { mDirtyBits.reset(); }
void clearDirtyBits(const DirtyBits &bitset) { mDirtyBits &= ~bitset; } void clearDirtyBits(const DirtyBits &bitset) { mDirtyBits &= ~bitset; }
void setAllDirtyBits() { mDirtyBits.set(); } void setAllDirtyBits() { mDirtyBits.set(); }
typedef angle::BitSet<DIRTY_OBJECT_MAX> DirtyObjects; using DirtyObjects = angle::BitSet<DIRTY_OBJECT_MAX>;
void clearDirtyObjects() { mDirtyObjects.reset(); } void clearDirtyObjects() { mDirtyObjects.reset(); }
void setAllDirtyObjects() { mDirtyObjects.set(); } void setAllDirtyObjects() { mDirtyObjects.set(); }
void syncDirtyObjects(const Context *context); void syncDirtyObjects(const Context *context);
......
...@@ -30,7 +30,7 @@ TEST_P(BindGeneratesResourceTest, QueryValidation) ...@@ -30,7 +30,7 @@ TEST_P(BindGeneratesResourceTest, QueryValidation)
GLint intValue = 2; GLint intValue = 2;
glGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &intValue); glGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &intValue);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(intValue, GL_FALSE); EXPECT_GL_FALSE(intValue);
float floatValue = 2.0f; float floatValue = 2.0f;
glGetFloatv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &floatValue); glGetFloatv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &floatValue);
...@@ -40,11 +40,11 @@ TEST_P(BindGeneratesResourceTest, QueryValidation) ...@@ -40,11 +40,11 @@ TEST_P(BindGeneratesResourceTest, QueryValidation)
GLboolean boolValue = GL_TRUE; GLboolean boolValue = GL_TRUE;
glGetBooleanv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &boolValue); glGetBooleanv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, &boolValue);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(boolValue, GL_FALSE); EXPECT_GL_FALSE(boolValue);
boolValue = glIsEnabled(GL_BIND_GENERATES_RESOURCE_CHROMIUM); boolValue = glIsEnabled(GL_BIND_GENERATES_RESOURCE_CHROMIUM);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(boolValue, GL_FALSE); EXPECT_GL_FALSE(boolValue);
glEnable(GL_BIND_GENERATES_RESOURCE_CHROMIUM); glEnable(GL_BIND_GENERATES_RESOURCE_CHROMIUM);
EXPECT_GL_ERROR(GL_INVALID_ENUM); EXPECT_GL_ERROR(GL_INVALID_ENUM);
......
...@@ -51,7 +51,7 @@ TEST_P(ClientArraysTest, QueryValidation) ...@@ -51,7 +51,7 @@ TEST_P(ClientArraysTest, QueryValidation)
GLboolean boolValue = GL_TRUE; GLboolean boolValue = GL_TRUE;
glGetBooleanv(GL_CLIENT_ARRAYS_ANGLE, &boolValue); glGetBooleanv(GL_CLIENT_ARRAYS_ANGLE, &boolValue);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_GL_FALSE(GL_FALSE); EXPECT_GL_FALSE(boolValue);
EXPECT_GL_FALSE(glIsEnabled(GL_CLIENT_ARRAYS_ANGLE)); EXPECT_GL_FALSE(glIsEnabled(GL_CLIENT_ARRAYS_ANGLE));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
......
...@@ -64,7 +64,7 @@ TEST_P(ComputeShaderTest, DetachShaderAfterLinkSuccess) ...@@ -64,7 +64,7 @@ TEST_P(ComputeShaderTest, DetachShaderAfterLinkSuccess)
glLinkProgram(program); glLinkProgram(program);
GLint linkStatus; GLint linkStatus;
glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
EXPECT_EQ(GL_TRUE, linkStatus); EXPECT_GL_TRUE(linkStatus);
glDetachShader(program, cs); glDetachShader(program, cs);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
...@@ -167,7 +167,7 @@ TEST_P(ComputeShaderTest, AttachMultipleShaders) ...@@ -167,7 +167,7 @@ TEST_P(ComputeShaderTest, AttachMultipleShaders)
GLint linkStatus; GLint linkStatus;
glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
EXPECT_EQ(GL_FALSE, linkStatus); EXPECT_GL_FALSE(linkStatus);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
} }
...@@ -275,7 +275,7 @@ TEST_P(ComputeShaderTest, DispatchComputeWithRenderingProgram) ...@@ -275,7 +275,7 @@ TEST_P(ComputeShaderTest, DispatchComputeWithRenderingProgram)
GLint linkStatus; GLint linkStatus;
glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
EXPECT_EQ(GL_TRUE, linkStatus); EXPECT_GL_TRUE(linkStatus);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
......
...@@ -51,13 +51,13 @@ TEST_P(FenceNVTest, IsFence) ...@@ -51,13 +51,13 @@ TEST_P(FenceNVTest, IsFence)
glGenFencesNV(1, &fence); glGenFencesNV(1, &fence);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(GL_FALSE, glIsFenceNV(fence)); EXPECT_GL_FALSE(glIsFenceNV(fence));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
glSetFenceNV(fence, GL_ALL_COMPLETED_NV); glSetFenceNV(fence, GL_ALL_COMPLETED_NV);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(GL_TRUE, glIsFenceNV(fence)); EXPECT_GL_TRUE(glIsFenceNV(fence));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
} }
...@@ -71,7 +71,7 @@ TEST_P(FenceNVTest, Errors) ...@@ -71,7 +71,7 @@ TEST_P(FenceNVTest, Errors)
} }
// glTestFenceNV should still return TRUE for an invalid fence and generate an INVALID_OPERATION // glTestFenceNV should still return TRUE for an invalid fence and generate an INVALID_OPERATION
EXPECT_EQ(GL_TRUE, glTestFenceNV(10)); EXPECT_GL_TRUE(glTestFenceNV(10));
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
GLuint fence = 20; GLuint fence = 20;
...@@ -86,7 +86,7 @@ TEST_P(FenceNVTest, Errors) ...@@ -86,7 +86,7 @@ TEST_P(FenceNVTest, Errors)
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
// glTestFenceNV should still return TRUE for a fence that is not started and generate an INVALID_OPERATION // glTestFenceNV should still return TRUE for a fence that is not started and generate an INVALID_OPERATION
EXPECT_EQ(GL_TRUE, glTestFenceNV(fence)); EXPECT_GL_TRUE(glTestFenceNV(fence));
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
// glGetFenceivNV should generate an INVALID_OPERATION for an invalid or unstarted fence and not modify the params // glGetFenceivNV should generate an INVALID_OPERATION for an invalid or unstarted fence and not modify the params
...@@ -139,7 +139,7 @@ TEST_P(FenceNVTest, BasicOperations) ...@@ -139,7 +139,7 @@ TEST_P(FenceNVTest, BasicOperations)
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
// Fence should be complete now that Finish has been called // Fence should be complete now that Finish has been called
EXPECT_EQ(GL_TRUE, status); EXPECT_GL_TRUE(status);
} }
EXPECT_PIXEL_EQ(0, 0, 255, 0, 255, 255); EXPECT_PIXEL_EQ(0, 0, 255, 0, 255, 255);
...@@ -151,8 +151,8 @@ TEST_P(FenceSyncTest, IsSync) ...@@ -151,8 +151,8 @@ TEST_P(FenceSyncTest, IsSync)
GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(GL_TRUE, glIsSync(sync)); EXPECT_GL_TRUE(glIsSync(sync));
EXPECT_EQ(GL_FALSE, glIsSync(reinterpret_cast<GLsync>(40))); EXPECT_GL_FALSE(glIsSync(reinterpret_cast<GLsync>(40)));
} }
// Test error cases for all Sync function // Test error cases for all Sync function
......
...@@ -101,7 +101,7 @@ TEST_P(OcclusionQueriesTest, IsOccluded) ...@@ -101,7 +101,7 @@ TEST_P(OcclusionQueriesTest, IsOccluded)
glDeleteQueriesEXT(1, &query); glDeleteQueriesEXT(1, &query);
EXPECT_GLENUM_EQ(GL_FALSE, result); EXPECT_GL_FALSE(result);
} }
TEST_P(OcclusionQueriesTest, IsNotOccluded) TEST_P(OcclusionQueriesTest, IsNotOccluded)
...@@ -135,7 +135,7 @@ TEST_P(OcclusionQueriesTest, IsNotOccluded) ...@@ -135,7 +135,7 @@ TEST_P(OcclusionQueriesTest, IsNotOccluded)
glDeleteQueriesEXT(1, &query); glDeleteQueriesEXT(1, &query);
EXPECT_GLENUM_EQ(GL_TRUE, result); EXPECT_GL_TRUE(result);
} }
TEST_P(OcclusionQueriesTest, Errors) TEST_P(OcclusionQueriesTest, Errors)
...@@ -156,8 +156,8 @@ TEST_P(OcclusionQueriesTest, Errors) ...@@ -156,8 +156,8 @@ TEST_P(OcclusionQueriesTest, Errors)
GLuint query2 = 0; GLuint query2 = 0;
glGenQueriesEXT(1, &query); glGenQueriesEXT(1, &query);
EXPECT_EQ(glIsQueryEXT(query), GL_FALSE); EXPECT_GL_FALSE(glIsQueryEXT(query));
EXPECT_EQ(glIsQueryEXT(query2), GL_FALSE); EXPECT_GL_FALSE(glIsQueryEXT(query2));
glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, 0); // can't pass 0 as query id glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, 0); // can't pass 0 as query id
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
...@@ -166,8 +166,8 @@ TEST_P(OcclusionQueriesTest, Errors) ...@@ -166,8 +166,8 @@ TEST_P(OcclusionQueriesTest, Errors)
glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, query2); // can't initiate a query while one's already active glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, query2); // can't initiate a query while one's already active
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
EXPECT_EQ(glIsQueryEXT(query), GL_TRUE); EXPECT_GL_TRUE(glIsQueryEXT(query));
EXPECT_EQ(glIsQueryEXT(query2), GL_FALSE); // have not called begin EXPECT_GL_FALSE(glIsQueryEXT(query2)); // have not called begin
drawQuad(mProgram, "position", 0.8f); // this quad should not be occluded drawQuad(mProgram, "position", 0.8f); // this quad should not be occluded
glEndQueryEXT(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT); // no active query for this target glEndQueryEXT(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT); // no active query for this target
...@@ -182,7 +182,7 @@ TEST_P(OcclusionQueriesTest, Errors) ...@@ -182,7 +182,7 @@ TEST_P(OcclusionQueriesTest, Errors)
glGenQueriesEXT(1, &query2); glGenQueriesEXT(1, &query2);
glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, query2); // should be ok now glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, query2); // should be ok now
EXPECT_EQ(glIsQueryEXT(query2), GL_TRUE); EXPECT_GL_TRUE(glIsQueryEXT(query2));
drawQuad(mProgram, "position", 0.3f); // this should draw in front of other quad drawQuad(mProgram, "position", 0.3f); // this should draw in front of other quad
glDeleteQueriesEXT(1, &query2); // should delete when query becomes inactive glDeleteQueriesEXT(1, &query2); // should delete when query becomes inactive
......
...@@ -262,7 +262,7 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathParameter) ...@@ -262,7 +262,7 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathParameter)
GLfloat coords[] = {50.0f, 50.0f}; GLfloat coords[] = {50.0f, 50.0f};
glPathCommandsCHROMIUM(path, 2, commands, 2, GL_FLOAT, coords); glPathCommandsCHROMIUM(path, 2, commands, 2, GL_FLOAT, coords);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
EXPECT_TRUE(glIsPathCHROMIUM(path) == GL_TRUE); EXPECT_GL_TRUE(glIsPathCHROMIUM(path));
static const GLenum kEndCaps[] = {GL_FLAT_CHROMIUM, GL_SQUARE_CHROMIUM, GL_ROUND_CHROMIUM}; static const GLenum kEndCaps[] = {GL_FLAT_CHROMIUM, GL_SQUARE_CHROMIUM, GL_ROUND_CHROMIUM};
for (std::size_t i = 0; i < 3; ++i) for (std::size_t i = 0; i < 3; ++i)
...@@ -360,7 +360,7 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathObjectState) ...@@ -360,7 +360,7 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathObjectState)
GLuint non_existing_paths[] = {0, 55, 74744}; GLuint non_existing_paths[] = {0, 55, 74744};
for (auto &p : non_existing_paths) for (auto &p : non_existing_paths)
{ {
EXPECT_TRUE(glIsPathCHROMIUM(p) == GL_FALSE); EXPECT_GL_FALSE(glIsPathCHROMIUM(p));
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
tryAllDrawFunctions(p, GL_NO_ERROR); tryAllDrawFunctions(p, GL_NO_ERROR);
} }
...@@ -368,7 +368,7 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathObjectState) ...@@ -368,7 +368,7 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathObjectState)
// Path name marked as used but without path object state causes // Path name marked as used but without path object state causes
// a GL error upon any draw command. // a GL error upon any draw command.
GLuint path = glGenPathsCHROMIUM(1); GLuint path = glGenPathsCHROMIUM(1);
EXPECT_TRUE(glIsPathCHROMIUM(path) == GL_FALSE); EXPECT_GL_FALSE(glIsPathCHROMIUM(path));
tryAllDrawFunctions(path, GL_INVALID_OPERATION); tryAllDrawFunctions(path, GL_INVALID_OPERATION);
glDeletePathsCHROMIUM(path, 1); glDeletePathsCHROMIUM(path, 1);
...@@ -377,15 +377,15 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathObjectState) ...@@ -377,15 +377,15 @@ TEST_P(CHROMIUMPathRenderingTest, TestPathObjectState)
// Path name that had path object state, but then was "cleared", still has a // Path name that had path object state, but then was "cleared", still has a
// path object state, even though the state is empty. // path object state, even though the state is empty.
path = glGenPathsCHROMIUM(1); path = glGenPathsCHROMIUM(1);
EXPECT_TRUE(glIsPathCHROMIUM(path) == GL_FALSE); EXPECT_GL_FALSE(glIsPathCHROMIUM(path));
GLubyte commands[] = {GL_MOVE_TO_CHROMIUM, GL_CLOSE_PATH_CHROMIUM}; GLubyte commands[] = {GL_MOVE_TO_CHROMIUM, GL_CLOSE_PATH_CHROMIUM};
GLfloat coords[] = {50.0f, 50.0f}; GLfloat coords[] = {50.0f, 50.0f};
glPathCommandsCHROMIUM(path, 2, commands, 2, GL_FLOAT, coords); glPathCommandsCHROMIUM(path, 2, commands, 2, GL_FLOAT, coords);
EXPECT_TRUE(glIsPathCHROMIUM(path) == GL_TRUE); EXPECT_GL_TRUE(glIsPathCHROMIUM(path));
glPathCommandsCHROMIUM(path, 0, nullptr, 0, GL_FLOAT, nullptr); glPathCommandsCHROMIUM(path, 0, nullptr, 0, GL_FLOAT, nullptr);
EXPECT_TRUE(glIsPathCHROMIUM(path) == GL_TRUE); // The surprise. EXPECT_GL_TRUE(glIsPathCHROMIUM(path)); // The surprise.
tryAllDrawFunctions(path, GL_NO_ERROR); tryAllDrawFunctions(path, GL_NO_ERROR);
glDeletePathsCHROMIUM(path, 1); glDeletePathsCHROMIUM(path, 1);
...@@ -1634,7 +1634,7 @@ TEST_P(CHROMIUMPathRenderingWithTexturingTest, TestProgramPathFragmentInputGenAr ...@@ -1634,7 +1634,7 @@ TEST_P(CHROMIUMPathRenderingWithTexturingTest, TestProgramPathFragmentInputGenAr
glDeleteProgram(mProgram); glDeleteProgram(mProgram);
// Test that using invalid (deleted) program is an invalid operation. // Test that using invalid (deleted) program is an invalid operation.
EXPECT_FALSE(glIsProgram(mProgram) == GL_FALSE); EXPECT_GL_TRUE(glIsProgram(mProgram));
glProgramPathFragmentInputGenCHROMIUM(mProgram, -1, kValidGenMode, kValidComponents, glProgramPathFragmentInputGenCHROMIUM(mProgram, -1, kValidGenMode, kValidComponents,
kCoefficients16); kCoefficients16);
...@@ -1981,4 +1981,4 @@ ANGLE_INSTANTIATE_TEST(CHROMIUMPathRenderingWithTexturingTest, ...@@ -1981,4 +1981,4 @@ ANGLE_INSTANTIATE_TEST(CHROMIUMPathRenderingWithTexturingTest,
ES2_OPENGL(), ES2_OPENGL(),
ES2_OPENGLES(), ES2_OPENGLES(),
ES3_OPENGL(), ES3_OPENGL(),
ES3_OPENGLES()); ES3_OPENGLES());
\ No newline at end of file
...@@ -88,21 +88,21 @@ TEST_P(ProgramPipelineTest31, BindProgramPipelineTest) ...@@ -88,21 +88,21 @@ TEST_P(ProgramPipelineTest31, BindProgramPipelineTest)
// Test IsProgramPipeline // Test IsProgramPipeline
TEST_P(ProgramPipelineTest31, IsProgramPipelineTest) TEST_P(ProgramPipelineTest31, IsProgramPipelineTest)
{ {
EXPECT_EQ(GL_FALSE, glIsProgramPipeline(0)); EXPECT_GL_FALSE(glIsProgramPipeline(0));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
EXPECT_EQ(GL_FALSE, glIsProgramPipeline(2)); EXPECT_GL_FALSE(glIsProgramPipeline(2));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
GLuint pipeline; GLuint pipeline;
glGenProgramPipelines(1, &pipeline); glGenProgramPipelines(1, &pipeline);
glBindProgramPipeline(pipeline); glBindProgramPipeline(pipeline);
EXPECT_EQ(GL_TRUE, glIsProgramPipeline(pipeline)); EXPECT_GL_TRUE(glIsProgramPipeline(pipeline));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
glBindProgramPipeline(0); glBindProgramPipeline(0);
glDeleteProgramPipelines(1, &pipeline); glDeleteProgramPipelines(1, &pipeline);
EXPECT_EQ(GL_FALSE, glIsProgramPipeline(pipeline)); EXPECT_GL_FALSE(glIsProgramPipeline(pipeline));
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
} }
......
...@@ -77,7 +77,7 @@ TEST_P(SRGBFramebufferTest, Validation) ...@@ -77,7 +77,7 @@ TEST_P(SRGBFramebufferTest, Validation)
EXPECT_GL_ERROR(expectedError); EXPECT_GL_ERROR(expectedError);
if (expectedError == GL_NO_ERROR) if (expectedError == GL_NO_ERROR)
{ {
EXPECT_EQ(GL_TRUE, value); EXPECT_GL_TRUE(value);
} }
glDisable(GL_FRAMEBUFFER_SRGB_EXT); glDisable(GL_FRAMEBUFFER_SRGB_EXT);
...@@ -87,7 +87,7 @@ TEST_P(SRGBFramebufferTest, Validation) ...@@ -87,7 +87,7 @@ TEST_P(SRGBFramebufferTest, Validation)
EXPECT_GL_ERROR(expectedError); EXPECT_GL_ERROR(expectedError);
if (expectedError == GL_NO_ERROR) if (expectedError == GL_NO_ERROR)
{ {
EXPECT_EQ(GL_FALSE, value); EXPECT_GL_FALSE(value);
} }
} }
......
...@@ -60,7 +60,7 @@ TEST_P(SyncQueriesTest, Basic) ...@@ -60,7 +60,7 @@ TEST_P(SyncQueriesTest, Basic)
glFlush(); glFlush();
GLuint result = 0; GLuint result = 0;
glGetQueryObjectuivEXT(mQuery, GL_QUERY_RESULT_EXT, &result); glGetQueryObjectuivEXT(mQuery, GL_QUERY_RESULT_EXT, &result);
EXPECT_EQ(static_cast<GLuint>(GL_TRUE), result); EXPECT_GL_TRUE(result);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment