Implement assert_str and assert_not_null and update tests

This commit is contained in:
2026-04-24 14:57:24 +02:00
parent 594e33efd6
commit 0fa7b599ed
4 changed files with 46 additions and 6 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ static void test_parser_module_name(void) {
TokenStream* ts = tokenstream_open("module my_module;");
Module* m = parser_parse(ts);
if (m == NULL) fail("expected module to be parsed");
if (strcmp(m->name, "my_module") != 0) fail("expected name 'my_module'");
assert_not_null(m, "expected module to be parsed");
assert_str("my_module", m->name, "expected name 'my_module'");
parser_free(m);
tokenstream_close(ts);