Skip to content

Commit

Permalink
fix: Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alinalihassan committed Jun 1, 2022
1 parent 43d3ec8 commit 1d1d0e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ TEST_CASE("Parser", "AST") {
auto parser = initializeParser(lexer);

REQUIRE(parser->getAST()->getChildren().size() == 3);
REQUIRE(parser->getAST()->getChildren().at(0)->toString(srcMgr.get(), "", true) == "VarDecl[Line(1-1):Col(1-17)]: y: int = 100\n");
REQUIRE(parser->getAST()->getChildren().at(1)->toString(srcMgr.get(), "", true) == "Assignment[Line(2-2):Col(1-8)]: y EQUAL 101\n");
REQUIRE(parser->getAST()->getChildren().at(2)->toString(srcMgr.get(), "", true) == "Expression[Line(3-3):Col(1-8)]: exit(y)\n");
REQUIRE(parser->getAST()->getChildren().at(0)->toString(srcMgr.get(), "", true) == "└──VarDecl[Line(1-1):Col(1-17)]: y: int = 100\n");
REQUIRE(parser->getAST()->getChildren().at(1)->toString(srcMgr.get(), "", true) == "└──Assignment[Line(2-2):Col(1-8)]: y EQUAL 101\n");
REQUIRE(parser->getAST()->getChildren().at(2)->toString(srcMgr.get(), "", true) == "└──Expression[Line(3-3):Col(1-8)]: exit(y)\n");

BENCHMARK("Parser") {
initializeParser(lexer);
Expand Down

0 comments on commit 1d1d0e3

Please sign in to comment.