diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/integration_test.c | 1 | ||||
-rw-r--r-- | test/parser_test.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/integration_test.c b/test/integration_test.c index 739a938..4178b42 100644 --- a/test/integration_test.c +++ b/test/integration_test.c @@ -42,6 +42,7 @@ test_examples(const MunitParameter params[], void *user_data_or_fixture) { assert_exit_status("../examples/main.pipa", 69); assert_exit_status("../examples/arithmetics.pipa", 13); + assert_exit_status("../examples/variables.pipa", 28); return MUNIT_OK; } diff --git a/test/parser_test.c b/test/parser_test.c index d534509..5d615ec 100644 --- a/test/parser_test.c +++ b/test/parser_test.c @@ -126,8 +126,8 @@ test_parse_variable_definition(const MunitParameter params[], void *user_data_or ast_node_t *ast_literal = ast_return->data.return_stmt.argument; - assert_int(AST_IDENTIFIER, ==, ast_literal->kind); - assert_string_view_equal("variable", ast_literal->data.identifier.name); + assert_int(AST_VARIABLE, ==, ast_literal->kind); + assert_string_view_equal("variable", ast_literal->data.variable.identifier->name); ast_node_destroy(ast_function); scope_destroy(scope); |