aboutsummaryrefslogtreecommitdiff
path: root/test/include
diff options
context:
space:
mode:
Diffstat (limited to 'test/include')
-rw-r--r--test/include/test.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/include/test.h b/test/include/test.h
index 7366aa2..74642b7 100644
--- a/test/include/test.h
+++ b/test/include/test.h
@@ -12,23 +12,19 @@ extern unsigned int TESTS_PASSED;
#define TEST_INIT unsigned int TESTS_RUN = 0, TESTS_PASSED = 0;
-#ifndef __func__
-#define __func__ ""
-#endif
-
#define ASSERT(EXPR) \
TESTS_RUN++; \
if (EXPR && ++TESTS_PASSED) { \
- LOG_INF("%s:%s:%d: Assertion passed!", __FILE__, __func__, __LINE__); \
+ LOG_INFF("%s:%s:%d: Assertion passed!", __FILE__, __func__, __LINE__); \
} else { \
- LOG_ERR("%s:%s:%d: Assertion failed:\n\t%s", __FILE__, __func__, __LINE__, #EXPR); \
+ LOG_ERRF("Assertion failed:\n\t%s", #EXPR); \
}
#define TEST_REPORT \
if (TESTS_RUN == TESTS_PASSED) { \
- LOG_YAY("%s: All %d tests passed!", __FILE__, TESTS_RUN); \
+ LOG_YAYF("%s: All %d tests passed!", __FILE__, TESTS_RUN); \
} else { \
- LOG_ERR("%d/%d tests failed.", TESTS_RUN - TESTS_PASSED, TESTS_RUN); \
+ LOG_ERRF("%d/%d tests failed.", TESTS_RUN - TESTS_PASSED, TESTS_RUN); \
}
#endif