Skip to content
Snippets Groups Projects
Commit e6d90590 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add missing test in ASTSymbolInitializationChecker

parent 40a3c74d
No related branches found
No related tags found
1 merge request!54Feature/language coverage
...@@ -301,5 +301,18 @@ let f : R->R, x->x+y; ...@@ -301,5 +301,18 @@ let f : R->R, x->x+y;
ASTSymbolTableBuilder{*ast}; ASTSymbolTableBuilder{*ast};
REQUIRE_THROWS_WITH(ASTSymbolInitializationChecker{*ast}, std::string{"uninitialized symbol 'y'"}); REQUIRE_THROWS_WITH(ASTSymbolInitializationChecker{*ast}, std::string{"uninitialized symbol 'y'"});
} }
SECTION("expecting a list of identifiers")
{
std::string_view data = R"(
let (x,y,z):R*R*R, x = 3;
)";
string_input input{data, "test.pgs"};
auto ast = ASTBuilder::build(input);
ASTSymbolTableBuilder{*ast};
REQUIRE_THROWS_WITH(ASTSymbolInitializationChecker{*ast}, std::string{"expecting a list of identifiers"});
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment