summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/hs_tests.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/hs_tests.h b/src/tests/hs_tests.h
index 3e1c98e..33285d7 100644
--- a/src/tests/hs_tests.h
+++ b/src/tests/hs_tests.h
@@ -22,6 +22,13 @@
if (!(test)) return message \
"\n" mu_indent " [" __FILE__ ":" STR(__LINE__) "]"; \
} while (0)
+#define mu_assert_equal(a, b) mu_assert("'" #a "' is not equal to '" #b "'", (a) == (b))
+#define mu_assert_not_equal(a, b) mu_assert("'" #a "' is equal to '" #b "'", (a) != (b))
+#define mu_assert_str_equal(a, b) \
+ mu_assert("'" #a "' is not equal to '" #b "'", strcmp((a), (b)) == 0)
+#define mu_assert_str_not_equal(a, b) \
+ mu_assert("'" #a "' is equal to '" #b "'", strcmp((a), (b)) != 0)
+
#define mu_run_test(name, test) do { \
lua_State *L = luaL_newstate(); \
luaL_openlibs(L); \