summaryrefslogtreecommitdiffstats
path: root/tests/TestHelpers.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-26 10:41:55 +0100
committerGitHub <noreply@github.com>2021-01-26 10:41:55 +0100
commit50a94f972d26ee15fc22cce657d13023d1022905 (patch)
tree24417c741cf85061b73098a32e61ecd3749be05e /tests/TestHelpers.h
parentRedstone: inline -> static (diff)
downloadcuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.gz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.bz2
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.lz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.xz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.zst
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.zip
Diffstat (limited to '')
-rw-r--r--tests/TestHelpers.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/TestHelpers.h b/tests/TestHelpers.h
index 0ef4014ac..cd1a52998 100644
--- a/tests/TestHelpers.h
+++ b/tests/TestHelpers.h
@@ -199,11 +199,11 @@ public:
/** Checks that the statement causes an ASSERT trigger. */
-#ifdef _DEBUG
- #define TEST_ASSERTS(Stmt) TEST_THROWS(Stmt, cAssertFailure)
-#else
+#ifdef NDEBUG
#define TEST_ASSERTS(Stmt) LOG("Skipped, cannot test in Release mode: TEST_ASSERT(%s); (%s:%d)", #Stmt, __FILE__, __LINE__)
-#endif // else _DEBUG
+#else
+ #define TEST_ASSERTS(Stmt) TEST_THROWS(Stmt, cAssertFailure)
+#endif // else NDEBUG