mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 22:28:32 +09:00
[Test] (MG_Test/ProgramTest/UniformMatrixTranspose): hard assert that uniforms to be tested exists
This commit is contained in:
@@ -292,7 +292,7 @@ TEST_F(ProgramTest, UniformMatrixTranspose) {
|
||||
|
||||
// Test 2x2 matrix transpose
|
||||
auto locMat2 = GetUniformLocation(program, "TestMat2");
|
||||
if (locMat2 != -1) {
|
||||
ASSERT_NE(locMat2, -1);
|
||||
// Test matrix (column-major as expected by OpenGL):
|
||||
// [1 3]
|
||||
// [2 4]
|
||||
@@ -327,11 +327,10 @@ TEST_F(ProgramTest, UniformMatrixTranspose) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
EXPECT_FLOAT_EQ(result2x2_transpose[i], expected2x2_transpose[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Test 3x3 matrix transpose
|
||||
auto locMat3 = GetUniformLocation(program, "TestMat3");
|
||||
if (locMat3 != -1) {
|
||||
ASSERT_NE(locMat3, -1);
|
||||
// Test matrix (column-major as expected by OpenGL):
|
||||
// [1 4 7]
|
||||
// [2 5 8]
|
||||
@@ -370,7 +369,6 @@ TEST_F(ProgramTest, UniformMatrixTranspose) {
|
||||
for (int i = 0; i < 9; i++) {
|
||||
EXPECT_FLOAT_EQ(result3x3_transpose[i], expected3x3_transpose[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Test 4x4 matrix transpose
|
||||
auto locProjMat = GetUniformLocation(program, "ProjMat");
|
||||
|
||||
Reference in New Issue
Block a user