[gtest] Consume AssertionResult
s in gl_ext_blend_func_ext...cc
Wrap each `testing::AssertionResult` in an `EXPECT_TRUE(...)` [0] to
actually check if the assertion passed. The dropped assertion was
revealed by Googletest recently marking `AssertionResult` as
`[[nodiscard]]` [1].
[0]: https://google.github.io/googletest/advanced.html#predicate-assertions-for-better-error-messages
[1]: 3fbe4db9a3
%5E%21/
Bug: 398298306
Change-Id: I62113ee2a104409ace4217c2571680cdc7844339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6293496
Auto-Submit: Jonathan Lee <jonathanjlee@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424733}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
955b7adc82
commit
f8da1eb6b7
@ -237,7 +237,7 @@ TEST_P(EXTBlendFuncExtendedDrawTest, ESSL1FragColor) {
|
||||
});
|
||||
// clang-format on
|
||||
CreateProgramWithFragmentShader(kFragColorShader);
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
DrawAndVerify();
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ TEST_P(EXTBlendFuncExtendedDrawTest, ESSL1FragData) {
|
||||
});
|
||||
// clang-format on
|
||||
CreateProgramWithFragmentShader(kFragDataShader);
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
DrawAndVerify();
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3Var) {
|
||||
// clang-format on
|
||||
CreateProgramWithFragmentShader(kFragColorShader);
|
||||
glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragColor");
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
DrawAndVerify();
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3BindArrayWithSimpleName) {
|
||||
CreateProgramWithFragmentShader(kFragDataShader);
|
||||
glBindFragDataLocationEXT(program_, 0, "FragData");
|
||||
glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragData");
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
DrawAndVerify();
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3BindArrayAsArray) {
|
||||
CreateProgramWithFragmentShader(kFragDataShader);
|
||||
glBindFragDataLocationEXT(program_, 0, "FragData[0]");
|
||||
glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragData[0]");
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
DrawAndVerify();
|
||||
}
|
||||
|
||||
@ -459,7 +459,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ES3Getters) {
|
||||
EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
|
||||
index = glGetFragDataIndexEXT(program_, "SecondaryFragColor");
|
||||
EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError());
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
|
||||
// Getters return location and index after linking. Run twice to confirm that
|
||||
// setters do not affect the getters until next link.
|
||||
@ -485,7 +485,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ES3Getters) {
|
||||
glBindFragDataLocationIndexedEXT(program_, 0, 1, "FragColor");
|
||||
}
|
||||
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
|
||||
location = glGetFragDataLocation(program_, "FragColor");
|
||||
EXPECT_EQ(0, location);
|
||||
@ -510,7 +510,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ES3Getters) {
|
||||
// Reset the settings and verify that the driver gets them correct.
|
||||
glBindFragDataLocationEXT(program_, 0, "FragColor");
|
||||
glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragColor");
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
DrawAndVerify();
|
||||
}
|
||||
|
||||
@ -590,7 +590,7 @@ TEST_P(EXTBlendFuncExtendedES3DrawTest, ES3GettersArray) {
|
||||
}
|
||||
|
||||
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
|
||||
LinkProgram();
|
||||
EXPECT_TRUE(LinkProgram());
|
||||
EXPECT_EQ(kFragData0Location, glGetFragDataLocation(program_, "FragData"));
|
||||
EXPECT_EQ(0, glGetFragDataIndexEXT(program_, "FragData"));
|
||||
EXPECT_EQ(kFragData0Location,
|
||||
|
Reference in New Issue
Block a user