using fixtures (not super necessary, but nice)

This commit is contained in:
Karma Riuk
2025-07-08 10:58:51 +02:00
parent 2dfff61346
commit 902f5a16df
3 changed files with 30 additions and 16 deletions

View File

@@ -83,18 +83,15 @@ TEST_SUITE("Parser: let") {
}
}
TEST_CASE("Parse well formed let statements") {
std::stringstream input("\
TEST_CASE_FIXTURE(ParserFixture, "Parse well formed let statements") {
setup("\
let x = 5;\
let y = 10;\
let foobar = 103213;\
");
lexer::lexer l{input};
parser::parser p{l};
ast::program* program = p.parse_program();
check_parser_errors(p.errors);
ast::program* program = p->parse_program();
check_parser_errors(p->errors);
REQUIRE_MESSAGE(
program != nullptr,