public void Evaluate_Substract_Negative_Test() { Expression left = CreateIntLiteral(1); Expression right = CreateIntLiteral(2); Expression substract = new Subtract(left, right, pos); Values.Int value = ((Values.Int)substract.Accept(evaluator)); Assert.IsTrue(value.GetValue() == -1); }
public void Evaluate_Substract_Positive_Test() { Expression left = CreateIntLiteral(2); Expression right = CreateIntLiteral(1); Expression substract = new Subtract(left, right, pos); Values.Int value = ((Values.Int)substract.Accept(evaluator)); Assert.IsTrue(value.GetValue() == 1); }