summaryrefslogtreecommitdiffstats
path: root/tests/Generating
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Generating')
-rw-r--r--tests/Generating/BasicGeneratorTest.cpp2
-rw-r--r--tests/Generating/PieceRotationTest.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/Generating/BasicGeneratorTest.cpp b/tests/Generating/BasicGeneratorTest.cpp
index 4b27f5344..10c66050b 100644
--- a/tests/Generating/BasicGeneratorTest.cpp
+++ b/tests/Generating/BasicGeneratorTest.cpp
@@ -186,7 +186,7 @@ static void testGenerateNether(cChunkGenerator & aDefaultNetherGen)
}
TEST_EQUAL_MSG(y, prevHeight, Printf("Failed: Same height across the entire chunk, at {%d, %d}: exp %d, got %d; top block: %d",
x, z, prevHeight, y, chd.GetBlockType(x, y, z)
- ))
+ ));
auto blockType = chd.GetBlockType(x, y, z);
TEST_EQUAL_MSG(blockType, E_BLOCK_BEDROCK,
Printf("Bedrock ceiling at {%d, %d, %d}: %d", x, y, z, blockType)
diff --git a/tests/Generating/PieceRotationTest.cpp b/tests/Generating/PieceRotationTest.cpp
index ace3bd489..fff3655c1 100644
--- a/tests/Generating/PieceRotationTest.cpp
+++ b/tests/Generating/PieceRotationTest.cpp
@@ -53,11 +53,14 @@ public:
-#define EXPECT(X) if (!(X)) \
- { \
- ASSERT(X); \
- throw cTestFailure(#X, __FILE__, __LINE__); \
- }
+#define EXPECT(X) \
+ do { \
+ if (!(X)) \
+ { \
+ ASSERT(X); \
+ throw cTestFailure(#X, __FILE__, __LINE__); \
+ } \
+ } while (false)