示例#1
0
 public static void TestOperations11()
 {
     Assert.AreEqual(3, RPN.CalculateRPN("9+Sqrt(9)-9"));
 }
示例#2
0
 public static void TestOperations8()
 {
     Assert.AreEqual(4, RPN.CalculateRPN("-2^2"));
 }
示例#3
0
 public static void TestOperations9()
 {
     Assert.AreEqual(15, RPN.CalculateRPN("9+6+"));
 }
示例#4
0
 public static void TestOperations6()
 {
     Assert.AreEqual(18, RPN.CalculateRPN("9--9"));
 }
示例#5
0
 public static void TestOperations7()
 {
     Assert.AreEqual(-9, RPN.CalculateRPN("0-9"));
 }
示例#6
0
 public static void TestOperations5()
 {
     Assert.AreEqual(90, RPN.CalculateRPN("9+Sqrt(81)^2"));
 }
示例#7
0
 public static void TestOperations04()
 {
     Assert.AreEqual(90, RPN.CalculateRPN("9+9^2"));
 }
示例#8
0
 public static void TestOperations4()
 {
     Assert.AreEqual(90, RPN.CalculateRPN(new List <string> {
         "9", "+", "9", "^", "2"
     }));
 }
示例#9
0
 public static void TestOperations03()
 {
     Assert.AreEqual(27, RPN.CalculateRPN("9+9+9"));
 }
示例#10
0
 public static void TestOperations1()
 {
     Assert.AreEqual(3, RPN.CalculateRPN(new List <string> {
         "-6", "+", "9"
     }));
 }