Add import parsing

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-25 14:30:11 +02:00
parent 116bdecafe
commit 7c7e0c3272
6 changed files with 100 additions and 0 deletions
+9
View File
@@ -67,6 +67,14 @@ void assert_log_file(const char* filepath, const char* msg) {
free(content);
}
void assert_int(int expected, int actual, const char* msg) {
if (expected != actual) {
char buf[64];
snprintf(buf, sizeof(buf), "%s (expected %d, got %d)", msg, expected, actual);
fail(buf);
}
}
static void log_append(const char* msg) {
size_t oldLen = s_logOutput ? strlen(s_logOutput) : 0;
size_t newLen = oldLen + strlen(msg) + 1;
@@ -111,6 +119,7 @@ static TestCase s_tests[] = {
{"tokenstream_unknown_token", test_tokenstream_unknown_token},
{"tokenstream_info", test_tokenstream_info},
{"parser_module_name", test_parser_module_name},
{"parser_imports", test_parser_imports},
{"log_error", test_log_error},
{"log_on_line", test_log_on_line},
};