[pypy-svn] r52210 - pypy/branch/jit-refactoring/pypy/jit/rainbow/test

arigo at codespeak.net arigo at codespeak.net
Thu Mar 6 12:08:26 CET 2008


Author: arigo
Date: Thu Mar  6 12:08:25 2008
New Revision: 52210

Modified:
   pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_llinterp.py
   pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py
Log:
Move and shorten a bit test_vdict_and_vlist; passes.
Add tests for virtualizable on top of the llinterp (skipped for now).


Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_llinterp.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_llinterp.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_llinterp.py	Thu Mar  6 12:08:25 2008
@@ -1,6 +1,6 @@
 import py
 from pypy.jit.conftest import option
-from pypy.jit.rainbow.test import test_portal
+from pypy.jit.rainbow.test import test_portal, test_virtualizable
 
 if option.quicktest:
     py.test.skip("slow")
@@ -14,17 +14,11 @@
     # ====> test_portal.py
 
 
-    def test_vdict_and_vlist(self):
-        py.test.skip("XXX")
-        def ll_function():
-            dic = {}
-            lst = [12] * 3
-            lst += []
-            lst.append(13)
-            lst.reverse()
-            dic[12] = 34
-            dic[lst[0]] = 35
-            return dic[lst.pop()]
-        res = self.timeshift_from_portal(ll_function, ll_function, [])
-        assert res == ll_function()
-        self.check_insns({})
+class TestLLVirtualizable(test_virtualizable.TestVirtualizableImplicit):
+    translate_support_code = True
+
+    def setup_method(self, meth):
+        py.test.skip("in-progress")
+
+    # for the individual tests see
+    # ====> test_virtualizable.py

Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_portal.py	Thu Mar  6 12:08:25 2008
@@ -554,3 +554,17 @@
         res = self.timeshift_from_portal(f, f, [7, 3])
         assert res == f(7, 3)
         self.check_insns(indirect_call=1, direct_call=1)
+
+
+    def test_vdict_and_vlist(self):
+        def ll_function():
+            dic = {}
+            lst = [12] * 3
+            lst.append(13)
+            lst.reverse()
+            dic[12] = 34
+            dic[lst[0]] = 35
+            return dic[lst.pop()]
+        res = self.timeshift_from_portal(ll_function, ll_function, [])
+        assert res == ll_function()
+        self.check_insns({})



More information about the Pypy-commit mailing list