summaryrefslogtreecommitdiff
path: root/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2023-12-11 18:45:23 -0500
committerLioncash <mai.iam2048@gmail.com>2023-12-11 18:45:25 -0500
commit4229d76ad6a9668aa3d380d1c79fa10b3d5adf86 (patch)
tree3e17abf47469c2c8589376a20d27f3b81b5847cd /Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
parentf04d834e8fbe2f1c5f01dfc29691031797b0bf94 (diff)
VertexLoaderTest: Resolve -Wdangling-else warnings
The ways the assertion macros expand end up generating -Wdangling-else warnings. Trivial enough to fix by just bracing the if statements.
Diffstat (limited to 'Source/UnitTests/VideoCommon/VertexLoaderTest.cpp')
-rw-r--r--Source/UnitTests/VideoCommon/VertexLoaderTest.cpp14
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);