public void TestMethod4() { string x = "min(56+5/4div2,)"; string expected = "#ERROR"; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate(x); string actual = res.GetValue(); Assert.AreEqual(expected, actual); }
public void TestMethod1() { string x = "34+2/(3*4-12)"; string expected = "#ERROR"; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate(x); string actual = res.GetValue(); Assert.AreEqual(expected, actual); }
public void TestMethod6() { string x = "3div2>3*1>4-1"; string expected = "False"; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate0(x); string actual = res.GetValue(); Assert.AreEqual(expected, actual); }
public void TestMethod1() { string x = "min(2+5div2,4)=(45-37)/2"; string expected = "True"; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate0(x); string actual = res.GetValue(); Assert.AreEqual(expected, actual); }
public void TestMethod4() { string x = "min(34,12+2)>max(32,12+2)"; string expected = "False"; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate0(x); string actual = res.GetValue(); Assert.AreEqual(expected, actual); }
public void TestMethod1() { string x = "12+(2*3)-3"; double expected = 15; Parser2 parse = new Parser2(); Result res = parse.Evaluate(x); double actual = res.Value; Assert.AreEqual(actual, expected); }
public void TestMethod() { string x = "(48-3)mod(56-3)*4"; double expected = 180; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate(x); double actual = res.Value; Assert.AreEqual(actual, expected); }
public void TestMethod4() { string x = "min(38+6/3*4+20,max(48-3*0,56-3*4))"; double expected = 48; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate(x); double actual = res.Value; Assert.AreEqual(actual, expected); }
public void TestMethod2() { string x = "(12mod3/3)*2div3"; double expected = 0; Parser2 pasre = new Parser2(); Result res = pasre.Evaluate(x); double actual = res.Value; Assert.AreEqual(actual, expected); }