예제 #1
0
 public void TestUnclosedBrackets()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("1+2/(3-4")
         );
 }
예제 #2
0
 public void TestUnopenedBracket()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("(((a))))+5")
         );
 }
예제 #3
0
 public void TestEmptyBrackets()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("1*(1+5/())")
         );
 }
예제 #4
0
 public void TestBracketsAfterLiteral()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("1(1+5)")
         );
 }
예제 #5
0
 public void TestTwoOperands()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("1+*12")
         );
 }
예제 #6
0
 public void NonOpenedBrackets()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("1+2*3)")
         );
 }
예제 #7
0
 public void TestOperationsWithoutNeededOperands()
 {
     Assert.Throws <IncorrectSyntaxException>(
         () => SimpleParser.Parse("1+")
         );
 }