moved the utils for the parser to a global utils
folder for the tests (that utils is includable only by the tests and not the src code, I added a compiler flag only for the tests in the makefile, but the compiler_flags.txt is global for the lsp, gotta be careful with that)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <doctest.h>
|
||||
|
||||
TEST_SUITE("Parser: return") {
|
||||
TEST_CASE_FIXTURE(ParserFixture, "Parse return statement") {
|
||||
TEST_CASE_FIXTURE(test::utils::ParserFixture, "Parse return statement") {
|
||||
setup("\
|
||||
return 5;\
|
||||
return 10;\
|
||||
@@ -15,7 +15,7 @@ return 12 + 34;\
|
||||
|
||||
for (const auto stmt : program->statements) {
|
||||
CHECK(stmt->token_literal() == "return");
|
||||
cast<ast::return_stmt>(stmt);
|
||||
test::utils::cast<ast::return_stmt>(stmt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user