summaryrefslogtreecommitdiff
path: root/src/lily-test.h
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2021-12-21 11:00:32 -0600
committersanine-a <sanine.not@pm.me>2021-12-21 11:00:32 -0600
commitb712a7ac4c6a7a8bb1d81d0adad8f98084b4d2fe (patch)
treec7c1a3add4eea07f3580e9c9c2fa9d9a8a088a8a /src/lily-test.h
parent98ab574f51a223bbd53052ded32dce6aebca9298 (diff)
refactor: move lily-test.h into root directory and move src/ -> tests/
Diffstat (limited to 'src/lily-test.h')
-rw-r--r--src/lily-test.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/lily-test.h b/src/lily-test.h
deleted file mode 100644
index 9f166b1..0000000
--- a/src/lily-test.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef LILY_TEST_H
-#define LILY_TEST_H
-
-#define lily_test const char *
-
-struct lily_test_data_t {
- int tests_run;
- int tests_failed;
-};
-
-#define LILY_INIT() \
- struct lily_test_data_t lily_test_data = { 0, 0 };
-
-
-// helper macros to turn numerical constants into strings
-#define STR_IMPL(x) #x
-#define STR(X) STR_IMPL(x)
-
-
-// assertion macros
-#define lily_indent " "
-#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_msg((a) == (b), "'" #a "' is not equal to '" #b "'")
-
-
-#endif