Exemple #1
0
        public void Simplify_Exponentiation_ReturnsExpression()
        {
            SyntaxNode root = GetExpression("2 ^ 4", new Environment());

            root = NumericalOperatorSimplifier.Simplify((OperatorNode)root);

            Assert.AreEqual("16", root.ToString());
        }
Exemple #2
0
        public void Simplify_Addition_ReturnsSyntaxNode()
        {
            SyntaxNode root = GetExpression("2 + 3", new Environment());

            root = NumericalOperatorSimplifier.Simplify((OperatorNode)root);

            Assert.AreEqual("5", root.ToString());
        }