[pypy-svn] r22681 - pypy/branch/jit-refactoring/pypy/rpython/test

pedronis at codespeak.net pedronis at codespeak.net
Thu Jan 26 13:55:07 CET 2006


Author: pedronis
Date: Thu Jan 26 13:55:05 2006
New Revision: 22681

Modified:
   pypy/branch/jit-refactoring/pypy/rpython/test/test_rlist.py
Log:
fix test that was broken by changes.



Modified: pypy/branch/jit-refactoring/pypy/rpython/test/test_rlist.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/rpython/test/test_rlist.py	(original)
+++ pypy/branch/jit-refactoring/pypy/rpython/test/test_rlist.py	Thu Jan 26 13:55:05 2006
@@ -902,12 +902,33 @@
         lst.append(42)
         return lst
 
+    from pypy.rpython import rgenop
+
+    class DummyBlockBuilder:
+
+        def __init__(self):
+            self.newblock = rgenop.newblock()
+
+        def genop(self, opname, args, RESULT_TYPE):
+            return rgenop.genop(self.newblock, opname, args, RESULT_TYPE)
+
+        def genconst(self, llvalue):
+            return rgenop.genconst(self.newblock, llvalue)
+
+        # inspection
+        def __getitem__(self, index):
+            return self.newblock.operations[index]
+
+        def __len__(self):
+            return len(self.newblock.operations)
+
+
     for fn in [fixed_size_case, variable_size_case]:
         t = TranslationContext()
         t.buildannotator().build_types(fn, [])
         t.buildrtyper().specialize()
         LIST = t.graphs[0].getreturnvar().concretetype.TO
-        llop = LowLevelOpList(None)
+        llop = DummyBlockBuilder()
         v0 = Constant(42)
         v0.concretetype = Signed
         v1 = Variable()



More information about the Pypy-commit mailing list