diff --git a/test/compiler-test.js b/test/compiler-test.js index 9d5998f..cdf94c4 100644 --- a/test/compiler-test.js +++ b/test/compiler-test.js @@ -453,12 +453,18 @@ test("arithmetics", function() { parses(parser, "(42+43)", 42+43); /* Test "product" rule. */ + parses(parser, "42", 42); parses(parser, "42*43", 42*43); parses(parser, "42*43*44*45", 42*43*44*45); + parses(parser, "42/43", 42/43); + parses(parser, "42/43/44/45", 42/43/44/45); /* Test "sum" rule. */ + parses(parser, "42*43", 42*43); parses(parser, "42*43+44*45", 42*43+44*45); parses(parser, "42*43+44*45+46*47+48*49", 42*43+44*45+46*47+48*49); + parses(parser, "42*43-44*45", 42*43-44*45); + parses(parser, "42*43-44*45-46*47-48*49", 42*43-44*45-46*47-48*49); /* Test "expr" rule. */ parses(parser, "42+43", 42+43);