Skip to content

Commit

Permalink
Added another parser test, to cover the changes in v2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FlatAssembler committed Nov 5, 2023
1 parent af8ab20 commit 4585c90
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,16 @@ void parserTests() {
"innerNumber))"},
{"InstantiateStructure QuadraticEquationSolution solutions[1 * 2 * 3];",
"(InstantiateStructure (QuadraticEquationSolution (solutions (* (* 1 "
"2) 3))))"}});
"2) 3))))"},
{
R"(
Function f(Decimal64 milliard := pow(10, 9)) Which Returns Nothing Does
// This function only parses correctly as of AECforWebAssembly v2.7.0.
Nothing;
EndFunction
)",
"(Function (f (Decimal64 (milliard (:= (pow 10 9))))) (Returns "
"Nothing) (Does Nothing))"}});
for (unsigned int i = 0; i < tests.size(); i++) {
std::string result = TreeNode::parse(TreeNode::tokenize(tests[i].input))[0]
.getLispExpression();
Expand Down

0 comments on commit 4585c90

Please sign in to comment.