aboutsummaryrefslogtreecommitdiff
path: root/include/kpl_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kpl_test.h')
-rw-r--r--include/kpl_test.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/kpl_test.h b/include/kpl_test.h
index 9f87db3..c1645e2 100644
--- a/include/kpl_test.h
+++ b/include/kpl_test.h
@@ -34,10 +34,12 @@ static void __attribute__((constructor)) _kpl_test_constructor_ ## NAME(void) {
} \
_KPL_TEST_FN(NAME)
-#define _KPL_TEST_FAIL_LINE _test->error_line_number = __LINE__
-
-#define _KPL_TEST_FAIL_MESSAGE(MESSAGE) _test->error_message = MESSAGE
-
-#define KPL_FAIL(MESSAGE) do { _KPL_TEST_FAIL_LINE; _KPL_TEST_FAIL_MESSAGE(MESSAGE); } while (0)
-
-#define KPL_ASSERT(CONDITION, MESSAGE) do { if (!(CONDITION)) { KPL_FAIL(#CONDITION "; " MESSAGE); } } while (0)
+#define KPL_FAIL(MESSAGE) do { \
+ _test->error_line_number = __LINE__; \
+ _test->error_message = MESSAGE; \
+} while (0)
+
+#define KPL_ASSERT(CONDITION, MESSAGE) do { \
+ if (!(CONDITION)) \
+ KPL_FAIL(#CONDITION "; " MESSAGE); \
+} while (0)