From ad288aaabdbaef179e5c627567b4f14bd234bbdf Mon Sep 17 00:00:00 2001 From: sulyi Date: Sun, 11 Dec 2016 14:17:31 +0100 Subject: [PATCH] [jsinterp] Parser test code fixes --- test/test_jsinterp_parser.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/test_jsinterp_parser.py b/test/test_jsinterp_parser.py index a1227e94b..40d026a36 100644 --- a/test/test_jsinterp_parser.py +++ b/test/test_jsinterp_parser.py @@ -637,9 +637,9 @@ class TestJSInterpreterParser(unittest.TestCase): ''' function a(x) { if (x > 0) - return true + return true; else - return false + return false; } ''' ) @@ -650,8 +650,8 @@ class TestJSInterpreterParser(unittest.TestCase): ''' function a(x) { if (x > 0) - return true - return false + return true; + return false; } ''' ) @@ -681,22 +681,24 @@ class TestJSInterpreterParser(unittest.TestCase): ast = [] self.assertEqual(list(jsi.statements()), ast) - @unittest.skip('Test not yet implemented: missing code and ast') + @unittest.skip('Test not yet implemented: missing ast') def test_switch(self): # TODO switch test jsi = JSInterpreter( ''' function a(x) { switch (x) { - case x == 6: + case 6: break; - case x > 5: + case 5: x++; - case x == 6: + case 8: x--; + break; default: x = 0; } + return x; } ''' )