diff --git a/test/test.h b/test/test.h index 3506d95..ecd6178 100644 --- a/test/test.h +++ b/test/test.h @@ -14,8 +14,8 @@ #define TEST_VERBOSE 0 #endif -#define TEST_INIT() printf("\t[%s]: Running...\n", __func__) -#define TEST_PASSED() printf("\t[%s]: Passed\n", __func__) +#define TEST_START() printf("\t[%s]: Running...\n", __func__) +#define TEST_END() printf("\t[%s]: Passed\n", __func__) #define TEST_INFO(...) \ do \ { \ diff --git a/test/test_lisp_api.c b/test/test_lisp_api.c index 64346a0..9047a35 100644 --- a/test/test_lisp_api.c +++ b/test/test_lisp_api.c @@ -12,7 +12,7 @@ void smi_test(void) { - TEST_INIT(); + TEST_START(); // Standard old testing, checking both sides of the number line and our set // bounds. i64 ints[] = { @@ -28,12 +28,12 @@ void smi_test(void) TEST(in == out, "%ld == %ld", in, out); } - TEST_PASSED(); + TEST_END(); } void smi_oob_test(void) { - TEST_INIT(); + TEST_START(); // These are integers that are completely out of the bounds of our standard // tagging system due to their size. We need to use big integers for this. i64 ints[] = { @@ -52,12 +52,12 @@ void smi_oob_test(void) TEST(in != out, "%ld != %ld", in, out); } - TEST_PASSED(); + TEST_END(); } void sym_fresh_test(void) { - TEST_INIT(); + TEST_START(); sys_t system = {0}; sys_init(&system); @@ -74,12 +74,12 @@ void sym_fresh_test(void) } sys_free(&system); - TEST_PASSED(); + TEST_END(); } void sym_unique_test(void) { - TEST_INIT(); + TEST_START(); sys_t system = {0}; sys_init(&system); @@ -106,12 +106,12 @@ void sym_unique_test(void) } sys_free(&system); - TEST_PASSED(); + TEST_END(); } void cons_test(void) { - TEST_INIT(); + TEST_START(); sys_t system = {0}; sys_init(&system); @@ -143,12 +143,12 @@ void cons_test(void) } sys_free(&system); - TEST_PASSED(); + TEST_END(); } void sys_test(void) { - TEST_INIT(); + TEST_START(); sys_t sys = {0}; sys_init(&sys); u64 old_memory_size = sys.memory.size; @@ -189,7 +189,7 @@ void sys_test(void) TEST(sys.memory.size == 0, "sys_free cleans up memory (shallow check)"); TEST(sys.symtable.count == 0, "sys_free cleans up symtable (shallow check)"); - TEST_PASSED(); + TEST_END(); } MAKE_TEST_SUITE(LISP_API_SUITE, "LISP API Tests", diff --git a/test/test_stream.c b/test/test_stream.c index 1ebd279..75cf001 100644 --- a/test/test_stream.c +++ b/test/test_stream.c @@ -43,7 +43,7 @@ void stream_test_epilogue(void) void stream_test_string(void) { - TEST_INIT(); + TEST_START(); sv_t test_strings[] = { SV("hello, world!", 13), SV("another string", 14), @@ -79,12 +79,12 @@ void stream_test_string(void) TEST(stream_eoc(&stream), "NULL stream is always at end of content"); stream_stop(&stream); - TEST_PASSED(); + TEST_END(); } void stream_test_file(void) { - TEST_INIT(); + TEST_START(); // Test that initialising works correctly { @@ -110,42 +110,42 @@ void stream_test_file(void) } } - TEST_PASSED(); + TEST_END(); } void stream_test_peek_next(void) { - TEST_INIT(); + TEST_START(); TODO("Not implemented"); } void stream_test_seek(void) { - TEST_INIT(); + TEST_START(); TODO("Not implemented"); } void stream_test_substr(void) { - TEST_INIT(); + TEST_START(); TODO("Not implemented"); } void stream_test_till(void) { - TEST_INIT(); + TEST_START(); TODO("Not implemented"); } void stream_test_while(void) { - TEST_INIT(); + TEST_START(); TODO("Not implemented"); } void stream_test_line_col(void) { - TEST_INIT(); + TEST_START(); TODO("Not implemented"); } diff --git a/test/test_sv.c b/test/test_sv.c index 5ad1237..ec6b6cf 100644 --- a/test/test_sv.c +++ b/test/test_sv.c @@ -13,7 +13,7 @@ void sv_copy_test(void) { - TEST_INIT(); + TEST_START(); static_assert(ARRSIZE(unique_words) > 3, "Expected at least 3 unique words"); for (u64 i = 0; i < 3; ++i) { diff --git a/test/test_symtable.c b/test/test_symtable.c index 7764a36..cf640a9 100644 --- a/test/test_symtable.c +++ b/test/test_symtable.c @@ -10,7 +10,7 @@ void symtable_test(void) { - TEST_INIT(); + TEST_START(); sym_table_t table = {0}; sym_table_init(&table); for (u64 i = 0; i < ARRSIZE(words); ++i) @@ -20,7 +20,7 @@ void symtable_test(void) ARRSIZE(unique_words)); sym_table_free(&table); - TEST_PASSED(); + TEST_END(); } MAKE_TEST_SUITE(SYMTABLE_SUITE, "Symbol Table Tests", diff --git a/test/test_vec.c b/test/test_vec.c index f532d8b..6e13c0a 100644 --- a/test/test_vec.c +++ b/test/test_vec.c @@ -10,7 +10,7 @@ void vec_test_concat(void) { - TEST_INIT(); + TEST_START(); sys_t system = {0}; sys_init(&system); @@ -34,12 +34,12 @@ void vec_test_concat(void) strlen(words_text)); sys_free(&system); - TEST_PASSED(); + TEST_END(); } void vec_test_substr(void) { - TEST_INIT(); + TEST_START(); sys_t system = {0}; sys_init(&system); // Generating substrings @@ -68,7 +68,7 @@ void vec_test_substr(void) } sys_free(&system); - TEST_PASSED(); + TEST_END(); } MAKE_TEST_SUITE(VEC_SUITE, "Vector Tests",