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