diff options
| author | Tilka <tilkax@gmail.com> | 2023-12-12 20:40:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-12 20:40:49 +0000 |
| commit | 7588f5e2daf97b9b5b5787cb08fc0f31daac50a7 (patch) | |
| tree | e82fed6d926a7e37f7831ae73a4f4270b8749615 /Source/UnitTests/VideoCommon/VertexLoaderTest.cpp | |
| parent | c92e4024544d4b0553f5cb6e922891b39de0b605 (diff) | |
| parent | 4229d76ad6a9668aa3d380d1c79fa10b3d5adf86 (diff) | |
Merge pull request #12395 from lioncash/test
VertexLoaderTest: Resolve -Wdangling-else warnings
Diffstat (limited to 'Source/UnitTests/VideoCommon/VertexLoaderTest.cpp')
| -rw-r--r-- | Source/UnitTests/VideoCommon/VertexLoaderTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp index f467fcd23b..24f975d8fc 100644 --- a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp +++ b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp @@ -835,10 +835,14 @@ TEST_P(VertexLoaderSkippedColorsTest, SkippedColors) ASSERT_EQ(m_loader->m_native_vtx_decl.colors[0].enable, enable_color_0); if (enable_color_0) + { ASSERT_EQ(m_loader->m_native_vtx_decl.colors[0].offset, color_0_offset); + } ASSERT_EQ(m_loader->m_native_vtx_decl.colors[1].enable, enable_color_1); if (enable_color_1) + { ASSERT_EQ(m_loader->m_native_vtx_decl.colors[1].offset, color_1_offset); + } RunVertices(2); // Vertex 0 @@ -846,17 +850,25 @@ TEST_P(VertexLoaderSkippedColorsTest, SkippedColors) ExpectOut(3); ExpectOut(4); if (enable_color_0) + { EXPECT_EQ((m_dst.Read<u32, true>()), 0x04050607u); + } if (enable_color_1) + { EXPECT_EQ((m_dst.Read<u32, true>()), 0x0c0d0e0fu); + } // Vertex 1 ExpectOut(1); ExpectOut(2); ExpectOut(3); if (enable_color_0) + { EXPECT_EQ((m_dst.Read<u32, true>()), 0x00010203u); + } if (enable_color_1) + { EXPECT_EQ((m_dst.Read<u32, true>()), 0x08090a0bu); + } } class VertexLoaderSkippedTexCoordsTest : public VertexLoaderTest, @@ -980,7 +992,9 @@ TEST_P(VertexLoaderSkippedTexCoordsTest, SkippedTextures) { ASSERT_EQ(m_loader->m_native_vtx_decl.texcoords[i].enable, component_enabled[i]); if (component_enabled[i]) + { ASSERT_EQ(m_loader->m_native_vtx_decl.texcoords[i].offset, component_offset[i]); + } } RunVertices(2); |
