summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Schlomoff <gregschlom@google.com>2022-04-04 15:06:44 -0700
committerGreg Schlomoff <gregschlom@google.com>2022-04-04 15:12:23 -0700
commitedecc3c57f583e75c0bbd8ac50f82afceea731fc (patch)
treee67ce240f43bb2c612cdff9eae520c7fc3cd7080
parent27ff840d73dfe8573d3489788529e03f0fa590b6 (diff)
downloadvulkan-cereal-edecc3c57f583e75c0bbd8ac50f82afceea731fc.tar.gz
Minor fix to OpenGL test:
This was a parameterized test using a pointer as the parameter type. As a result, the name of the test would be different from one machine to another because CTest would use the pointer value as part of the test name (for example: `GLES2SnapshotRasterization/SnapshotGlPolygonOffsetTest.SetPolygonOffset/00007FF674529148`), which in turn didn't work with our mechanism to skip certain tests on Kokoro. Test: compile, run the test Change-Id: I98e5f4c11bdc87c1c65fe23f8065bc932b5b2d8a
-rw-r--r--stream-servers/tests/GLSnapshotRasterization_unittest.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/stream-servers/tests/GLSnapshotRasterization_unittest.cpp b/stream-servers/tests/GLSnapshotRasterization_unittest.cpp
index 9719dc34..ce507e57 100644
--- a/stream-servers/tests/GLSnapshotRasterization_unittest.cpp
+++ b/stream-servers/tests/GLSnapshotRasterization_unittest.cpp
@@ -85,8 +85,7 @@ INSTANTIATE_TEST_SUITE_P(GLES2SnapshotRasterization,
::testing::ValuesIn(kGLES2FrontFaceModes));
class SnapshotGlPolygonOffsetTest
- : public SnapshotSetValueTest<GLfloat*>,
- public ::testing::WithParamInterface<const GLfloat*> {
+ : public SnapshotSetValueTest<GLfloat*> {
void stateCheck(GLfloat* expected) override {
EXPECT_TRUE(compareGlobalGlFloat(gl, GL_POLYGON_OFFSET_FACTOR,
expected[0]));
@@ -94,19 +93,16 @@ class SnapshotGlPolygonOffsetTest
compareGlobalGlFloat(gl, GL_POLYGON_OFFSET_UNITS, expected[1]));
}
void stateChange() override {
- gl->glPolygonOffset(GetParam()[0], GetParam()[1]);
+ gl->glPolygonOffset(0.5f, 0.5f);
}
};
-TEST_P(SnapshotGlPolygonOffsetTest, SetPolygonOffset) {
+TEST_F(SnapshotGlPolygonOffsetTest, SetPolygonOffset) {
GLfloat defaultOffset[2] = {0.0f, 0.0f};
- GLfloat testOffset[2] = {GetParam()[0], GetParam()[1]};
+ GLfloat testOffset[2] = {0.5f, 0.5f};
setExpectedValues(defaultOffset, testOffset);
doCheckedSnapshot();
}
-INSTANTIATE_TEST_SUITE_P(GLES2SnapshotRasterization,
- SnapshotGlPolygonOffsetTest,
- ::testing::Values(kGLES2TestPolygonOffset));
} // namespace emugl