Created
October 26, 2016 02:32
-
-
Save toptensoftware/58c5a81c1779022eb71aef91dcbed646 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [TestMethod] | |
| public void AddSubtractTest() | |
| { | |
| // Add | |
| Assert.AreEqual(Parser.Parse("10 + 20").Eval(), 30); | |
| // Subtract | |
| Assert.AreEqual(Parser.Parse("10 - 20").Eval(), -10); | |
| // Sequence | |
| Assert.AreEqual(Parser.Parse("10 + 20 - 40 + 100").Eval(), 90); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment