[pypy-svn] r53974 - pypy/branch/jit-hotpath/pypy/jit/rainbow/test

antocuni at codespeak.net antocuni at codespeak.net
Mon Apr 21 16:12:41 CEST 2008


Author: antocuni
Date: Mon Apr 21 16:12:40 2008
New Revision: 53974

Modified:
   pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_tlr.py
Log:
port test_tlr to ootype, but disable it since it doesn't pass



Modified: pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_tlr.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_tlr.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_tlr.py	Mon Apr 21 16:12:40 2008
@@ -1,4 +1,4 @@
-from pypy.rpython.module.support import LLSupport
+from pypy.rpython.module.support import LLSupport, OOSupport
 from pypy.jit.rainbow.test.test_portal import PortalTest
 from pypy.jit.rainbow.test.test_vlist import P_OOPSPEC
 from pypy.tool.sourcetools import func_with_new_name
@@ -6,16 +6,16 @@
 from pypy.jit.tl import tlr
 
 
-class TestTLR(PortalTest):
-    type_system = "lltype"
+class BaseTestTLR(PortalTest):
 
     def test_tlr(self):
         bytecode = ','.join([str(ord(c)) for c in tlr.SQUARE])
         tlr_interpret = func_with_new_name(tlr.interpret, "tlr_interpret")
+        to_rstr = self.to_rstr
         # to stick attributes on the new function object, not on tlr.interpret
         def build_bytecode(s):
             result = ''.join([chr(int(t)) for t in s.split(',')])
-            return LLSupport.to_rstr(result)
+            return to_rstr(result)
         tlr_interpret.convert_arguments = [build_bytecode, int]
 
         res = self.timeshift_from_portal(tlr_interpret, tlr_interpret, [bytecode, 1764],
@@ -25,3 +25,11 @@
         res = self.timeshift_from_portal(tlr_interpret, tlr_interpret, [bytecode, 9],
                              policy=P_OOPSPEC)
         assert res == 81
+
+class TestLLType(BaseTestTLR):
+    type_system = "lltype"
+    to_rstr = staticmethod(LLSupport.to_rstr)
+
+##class TestOOType(BaseTestTLR):
+##    type_system = "ootype"
+##    to_rstr = staticmethod(OOSupport.to_rstr)



More information about the Pypy-commit mailing list