Implement public import parsing and add test case

This commit is contained in:
2026-04-25 15:06:20 +02:00
parent d8544d7743
commit 63dd5fa5c9
4 changed files with 47 additions and 0 deletions
+13
View File
@@ -75,6 +75,18 @@ void assert_int(int expected, int actual, const char* msg) {
}
}
void assert_true(bool condition, const char* msg) {
if (!condition) {
fail(msg);
}
}
void assert_false(bool condition, const char* msg) {
if (condition) {
fail(msg);
}
}
static void log_append(const char* msg) {
size_t oldLen = s_logOutput ? strlen(s_logOutput) : 0;
size_t newLen = oldLen + strlen(msg) + 1;
@@ -124,6 +136,7 @@ static TestCase s_tests[] = {
{"parser_missing_semicolon_import", test_parser_missing_semicolon_import},
{"parser_bad_import_name", test_parser_bad_import_name},
{"parser_imports", test_parser_imports},
{"parser_public_imports", test_parser_public_imports},
{"log_error", test_log_error},
{"log_on_line", test_log_on_line},
};