Implement tokenstream_get_test and simplified assert_log_file using test names

This commit is contained in:
2026-04-26 20:31:17 +02:00
parent e910c01348
commit 9449f16e02
36 changed files with 106 additions and 92 deletions
+2 -2
View File
@@ -82,11 +82,11 @@ static void test_tokenstream_void_function_signature(void) {
}
static void test_tokenstream_unknown_token(void) {
TokenStream* ts = tokenstream_open("test.c", "%");
TokenStream* ts = tokenstream_get_test();
if (tokenstream_next(ts).token != TOKEN_UNKNOWN) fail("expected TOKEN_UNKNOWN");
assert_log_file("v0/tests/unknown_token.txt", "expected error message for unknown token");
assert_log_file("expected error message for unknown token");
tokenstream_close(ts);
}