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