public void CanThrowOnSecondSentenceWithSyntaxError() { LogoSyntaxErrorException exception = TestParseProgramThrows("FORWARD 50 LEFT"); Assert.AreEqual(LogoErrorCode.MatchError, exception.ErrorCode); Assert.AreEqual("LEFT", exception.ScanBuffer); }
public void CanThrowOnSimpleSyntaxError() { LogoSyntaxErrorException exception = TestParseProgramThrows("50 FORWARD"); Assert.AreEqual(LogoErrorCode.SentenceError, exception.ErrorCode); Assert.AreEqual("50", exception.ScanBuffer); }
public void CanThrowOnMissingRBracketSyntaxError() { LogoSyntaxErrorException exception = TestParseProgramThrows("REPEAT 4 [ FORWARD 50"); Assert.AreEqual(LogoErrorCode.MatchError, exception.ErrorCode); Assert.AreEqual("50", exception.ScanBuffer); }