aboutsummaryrefslogtreecommitdiff
path: root/tests/test.h
diff options
context:
space:
mode:
authorDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-15 20:49:20 +0100
committerDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-15 20:49:20 +0100
commit8fcc38ce404f16b2809a73de7bdf778bb84becb4 (patch)
treeeb3da105ae8dfb4df697e972b95d0b10abd134e9 /tests/test.h
parent74a547aa407ff8555f40dc38b18dee0bdb708836 (diff)
downloadunja-8fcc38ce404f16b2809a73de7bdf778bb84becb4.tar.gz
unja-8fcc38ce404f16b2809a73de7bdf778bb84becb4.zip
add basic infix expressions
Diffstat (limited to 'tests/test.h')
-rw-r--r--tests/test.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.h b/tests/test.h
index 5c76448..f860ee2 100644
--- a/tests/test.h
+++ b/tests/test.h
@@ -8,6 +8,7 @@
#define TEST(name) strcpy(current_test, #name);
#define assert_str(actual, expected) _assert(actual != NULL && strcmp(actual, expected) == 0, __FILE__, __LINE__, "invalid string: expected %s, got %s", expected, actual)
#define assert(assertion, format, ...) _assert(assertion, __FILE__, __LINE__, format, ##__VA_ARGS__)
+#define ARRAY_SIZE(arr) sizeof arr / sizeof arr[0]
/* used to store the running test name */
char current_test[256] = {'\0'};