From 0494bf05afac728740c1e14c4b4de1719089e4e2 Mon Sep 17 00:00:00 2001 From: Ilusha <63184036+IlyaShurupov@users.noreply.github.com> Date: Wed, 13 Mar 2024 14:10:18 +0300 Subject: [PATCH] add parser chech for precedence in arithmetic expressions --- Objects/tests/TestInterpreter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Objects/tests/TestInterpreter.cpp b/Objects/tests/TestInterpreter.cpp index f4a48bc..6657923 100644 --- a/Objects/tests/TestInterpreter.cpp +++ b/Objects/tests/TestInterpreter.cpp @@ -106,6 +106,8 @@ TEST_DEF_STATIC(Simple) { }; exec("10 + 15;"); + exec("print 10 + 15 * 10;"); + exec("print 10 + 15 * (10 + 10) + 5;"); exec("print 10 + 15;"); exec("print (10 + 15) * 20;"); exec("var k : int;"); @@ -134,7 +136,7 @@ TEST_DEF_STATIC(Complex) { TEST_DEF(Interpreter) { testEntry(); - // testSimple(); + testSimple(); testSimpleSave(); // testComplex(); }