Skip to content
Snippets Groups Projects
Commit e130d72e authored by Chris's avatar Chris
Browse files

Test für zu viele Ends hinzugefügt

parent 5fdca0d9
No related branches found
No related tags found
1 merge request!1Master
......@@ -132,6 +132,16 @@ class LOOPInterpreterTest(unittest.TestCase):
with self.assertRaises(SyntaxError):
interpret(';x1:=x1+1')
def test_syntax_unnecessary_end(self):
with self.assertRaises(SyntaxError):
interpret('LOOP x0 DO x1:=x1+1 END END')
with self.assertRaises(SyntaxError):
interpret('LOOP x0 DO x1:=x1+1 END; x1:=x1+1 END')
with self.assertRaises(SyntaxError):
interpret('x1:=x1+1; END x1:=x1+1')
with self.assertRaises(SyntaxError):
interpret('END x1:=x1+1')
def test_syntax_missing_semicolon(self):
with self.assertRaises(SyntaxError):
interpret('x0:=2 LOOP x0 DO x1:=x1+1 END')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment