Introduce golden file mechanism for tests
This commit is contained in:
+1
-6
@@ -86,12 +86,7 @@ static void test_tokenstream_unknown_token(void) {
|
||||
|
||||
if (tokenstream_next(ts).token != TOKEN_UNKNOWN) fail("expected TOKEN_UNKNOWN");
|
||||
|
||||
assert_log(
|
||||
"--- test.c ---\n"
|
||||
"1| %\n"
|
||||
" ^\n"
|
||||
" unexpected token '%'\n",
|
||||
"expected error message for unknown token");
|
||||
assert_log_file("v0/tests/unknown_token.txt", "expected error message for unknown token");
|
||||
|
||||
tokenstream_close(ts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user