diff options
Diffstat (limited to 'src/unittest/test.h')
-rw-r--r-- | src/unittest/test.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unittest/test.h b/src/unittest/test.h index 44b0cd02b..1102f6d33 100644 --- a/src/unittest/test.h +++ b/src/unittest/test.h @@ -71,7 +71,7 @@ class TestFailedException : public std::exception { } // Asserts the comparison specified by CMP is true, or fails the current unit test -#define UASSERTCMP(T, CMP, actual, expected) do { \ +#define UASSERTCMP(T, CMP, actual, expected) { \ T a = (actual); \ T e = (expected); \ if (!(a CMP e)) { \ @@ -84,12 +84,12 @@ class TestFailedException : public std::exception { << e << std::endl; \ throw TestFailedException(); \ } \ -} while (0) +} #define UASSERTEQ(T, actual, expected) UASSERTCMP(T, ==, actual, expected) // UASSERTs that the specified exception occurs -#define EXCEPTION_CHECK(EType, code) do { \ +#define EXCEPTION_CHECK(EType, code) { \ bool exception_thrown = false; \ try { \ code; \ @@ -97,7 +97,7 @@ class TestFailedException : public std::exception { exception_thrown = true; \ } \ UASSERT(exception_thrown); \ -} while (0) +} class IGameDef; |