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

Test: Fehlender Test für Semikolon am Ende des Programms hinzugefügt

parent e5c6a18a
No related branches found
No related tags found
1 merge request!1Master
...@@ -114,6 +114,8 @@ class WHILEInterpreterTest(LOOPInterpreterTest): ...@@ -114,6 +114,8 @@ class WHILEInterpreterTest(LOOPInterpreterTest):
interpret('x1:=2;; x0:=3') interpret('x1:=2;; x0:=3')
with self.assertRaises(SyntaxError): with self.assertRaises(SyntaxError):
interpret('WHILE x1 != 0 DO x0:=2;;x2:=1 END') interpret('WHILE x1 != 0 DO x0:=2;;x2:=1 END')
with self.assertRaises(SyntaxError):
interpret('x0:=5;')
@mock.patch('whileinterpreter.input', side_effect=str_yes) @mock.patch('whileinterpreter.input', side_effect=str_yes)
def test_infinite_loop(self, custom_input): def test_infinite_loop(self, custom_input):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment