Esempio n. 1
0
        public void CanThrowOnSecondSentenceWithSyntaxError()
        {
            LogoSyntaxErrorException exception = TestParseProgramThrows("FORWARD 50 LEFT");

            Assert.AreEqual(LogoErrorCode.MatchError, exception.ErrorCode);
            Assert.AreEqual("LEFT", exception.ScanBuffer);
        }
Esempio n. 2
0
        public void CanThrowOnSimpleSyntaxError()
        {
            LogoSyntaxErrorException exception = TestParseProgramThrows("50 FORWARD");

            Assert.AreEqual(LogoErrorCode.SentenceError, exception.ErrorCode);
            Assert.AreEqual("50", exception.ScanBuffer);
        }
Esempio n. 3
0
        public void CanThrowOnMissingRBracketSyntaxError()
        {
            LogoSyntaxErrorException exception = TestParseProgramThrows("REPEAT 4 [ FORWARD 50");

            Assert.AreEqual(LogoErrorCode.MatchError, exception.ErrorCode);
            Assert.AreEqual("50", exception.ScanBuffer);
        }