summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2021-12-21 01:10:53 -0600
committersanine <sanine.not@pm.me>2021-12-21 01:10:53 -0600
commit98ab574f51a223bbd53052ded32dce6aebca9298 (patch)
tree3410a20424cbae2ec1f74d8ad6c9888b942ad079 /src
parentaa206b75f8c89ab5e0fdeede558775ae7c072113 (diff)
refactor: lily_assert -> lily_assert_msg
Diffstat (limited to 'src')
-rw-r--r--src/lily-test.h4
-rw-r--r--src/test.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lily-test.h b/src/lily-test.h
index e8faf54..9f166b1 100644
--- a/src/lily-test.h
+++ b/src/lily-test.h
@@ -19,14 +19,14 @@ struct lily_test_data_t {
// assertion macros
#define lily_indent " "
-#define lily_assert(statement, message) \
+#define lily_assert_msg(statement, message) \
do { \
if (!(statement)) \
return "" message \
"\n" lily_indent " [" __FILE__ ":" STR(__LINE__) "]"; \
} while(0)
-#define lily_assert_equal(a, b) lily_assert((a) == (b), "'" #a "' is not equal to '" #b "'")
+#define lily_assert_equal(a, b) lily_assert_msg((a) == (b), "'" #a "' is not equal to '" #b "'")
#endif
diff --git a/src/test.c b/src/test.c
index 8a5d141..85c1ad7 100644
--- a/src/test.c
+++ b/src/test.c
@@ -51,7 +51,7 @@ int get_message(char **destination, const char *source)
lily_test wrap_assert(bool statement)
{
- lily_assert(statement, assert_msg);
+ lily_assert_msg(statement, assert_msg);
return 0;
}