Implement assert_str and assert_not_null and update tests
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user