浏览代码

Added another two tests

Yentl Van Tendeloo 9 年之前
父节点
当前提交
084b104502
共有 1 个文件被更改,包括 7 次插入33 次删除
  1. 7 33
      integration/test_constructors_al_linkable.py

+ 7 - 33
integration/test_constructors_al_linkable.py

@@ -182,36 +182,6 @@ class TestConstructorsActionLanguageLinkable(unittest.TestCase):
         commands = extend_commands(commands)
         self.assertTrue(run_barebone(commands, ["123456"], None, link=["test.o"], inputs=["123456"]))
 
-    """
-    def test_constructors_funcdecl(self):
-        commands = ['"declare"',
-                        1,
-                        'true',
-                    '"funcdef"', 1,
-                        '2',
-                        2,
-                        3,
-                        '"return"', 'true',
-                            '"call"',
-                                '"deref"', '"primitives/integer_addition"',
-                                '2',
-                                '"access"', '"resolve"', 2,
-                                '"access"', '"resolve"', 3,
-                                'false',
-                        'true',
-                    '"output"',
-                        '"call"',
-                            '"access"', '"resolve"', 1,
-                            '2',
-                            '"input"',
-                            '"input"',
-                            'false',
-                        'true',
-                    '"return"', 'true',
-                        '"const"', 'true',
-                ]
-        self.assertTrue(run_barebone(flatten(commands) + ['2', '5'], ["7"], 1))
-
     def test_constructors_continue(self):
         commands = ['"while"',
                         '"const"', 'true',
@@ -229,8 +199,11 @@ class TestConstructorsActionLanguageLinkable(unittest.TestCase):
                         'true',
                     '"return"', 'true',
                         '"const"', 'true',
+                    'false'
                 ]
-        self.assertTrue(run_barebone(flatten(commands), ['1', '1', '1', '1', '1'], 1))
+        commands = extend_commands(commands)
+        self.assertTrue(run_barebone(commands, ['1', '1', '1', '1', '1'], None, link=["test.o"]))
+
     def test_constructors_break(self):
         commands = ['"while"',
                         '"const"', 'true',
@@ -248,6 +221,7 @@ class TestConstructorsActionLanguageLinkable(unittest.TestCase):
                         'true',
                     '"return"', 'true',
                         '"const"', 'true',
+                    'false'
                 ]
-        self.assertTrue(run_barebone(flatten(commands), ['1', '3'], 1))
-    """
+        commands = extend_commands(commands)
+        self.assertTrue(run_barebone(commands, ['1', '3'], None, link=["test.o"]))