summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parser_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parser_test.c b/test/parser_test.c
index 3f814c6..ce77828 100644
--- a/test/parser_test.c
+++ b/test/parser_test.c
@@ -210,7 +210,7 @@ test_parse_basic_syntax_errors(const MunitParameter params[], void *user_data_or
assert_parser_error("main() i32 { return 42; }", "expected ':' but got 'TOKEN_NAME'");
assert_parser_error("main(): { return 42; }", "expected 'TOKEN_NAME' but got '{'");
assert_parser_error("main(): i32 return 42; }", "expected '{' but got 'return'");
- assert_parser_error("main(): i32 { 42; }", "expected 'TOKEN_NAME' but got 'TOKEN_NUMBER'");
+ assert_parser_error("main(): i32 { 42; }", "unexpected token 'TOKEN_NUMBER' value='42'");
assert_parser_error("main(): i32 { return; }", "unexpected '; (;)' token");
assert_parser_error("main(): i32 { return 42;", "expected '}' but got end of file");
assert_parser_error("main(): beff { return 42; }", "type 'beff' is not defined");
@@ -218,7 +218,7 @@ test_parse_basic_syntax_errors(const MunitParameter params[], void *user_data_or
assert_parser_error("main(): i32 { b = 1; return b; }", "trying to assign 'b' before defining it.");
// FIXME: once function calls are implemented, this error should inform that
// neither a variable or function call was found.
- assert_parser_error("main(): i32 { oxi 42; }", "expected 'TOKEN_NAME' but got 'TOKEN_NUMBER'");
+ assert_parser_error("main(): i32 { oxi 42; }", "unexpected token 'TOKEN_NAME' value='oxi'");
return MUNIT_OK;
}