added a way to show the call stack of the functions

This commit is contained in:
Karma Riuk
2025-07-11 19:48:55 +02:00
parent c9ffeafd5f
commit 6cd99c22fe
3 changed files with 35 additions and 0 deletions

View File

@@ -205,4 +205,11 @@ TEST_SUITE("Parser: expression") {
CHECK(program->str() == t.expected);
}
}
TEST_CASE_FIXTURE(ParserFixture, "Test to see trace") {
setup("-1 * 2 - 3");
CHECK(program->str() == "(((-1) * 2) - 3)");
setup("-1 - 2 * 3");
CHECK(program->str() == "((-1) - (2 * 3))");
}
}