Example #1
0
        public void GetExpressionsWith1Parentesis()
        {
            List <MathExpression> expressions = _lexer.GetExpressions("(2 + 2)");

            Assert.AreEqual(1, expressions.Count);
            Assert.AreEqual("2 + 2", expressions[0].Expression);
        }
Example #2
0
        public void GetExpressionsWithNestedParenthesis()
        {
            var expressions = lexer.GetExpressions("((2) + 2)");

            this.FailIfOtherSubexpressionThan(expressions, "2", "+");
        }