[pypy-svn] r52022 - pypy/branch/jit-refactoring/pypy/jit/timeshifter/test

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Mar 1 22:43:03 CET 2008


Author: cfbolz
Date: Sat Mar  1 22:43:02 2008
New Revision: 52022

Modified:
   pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/support.py
   pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rcontainer.py
   pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rvalue.py
Log:
fix those tests


Modified: pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/support.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/support.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/support.py	Sat Mar  1 22:43:02 2008
@@ -57,11 +57,6 @@
             raise AttributeError, name
 
 
-class FakeHRTyper(object):
-    RGenOp = FakeRGenOp
-
-fakehrtyper = FakeHRTyper()
-
 class FakeGenVar(GenVar):
     def __init__(self, count=0):
         self.count=count
@@ -87,7 +82,7 @@
 def vmalloc(TYPE, *boxes):
     jitstate = FakeJITState()
     assert isinstance(TYPE, lltype.Struct)   # for now
-    structdesc = rcontainer.StructTypeDesc(fakehrtyper, TYPE)
+    structdesc = rcontainer.StructTypeDesc(FakeRGenOp, TYPE)
     box = structdesc.factory()
     for fielddesc, valuebox in zip(structdesc.fielddescs, boxes):
         if valuebox is None:
@@ -104,5 +99,5 @@
 
 def getfielddesc(STRUCT, name):
     assert isinstance(STRUCT, lltype.Struct)
-    structdesc = rcontainer.StructTypeDesc(fakehrtyper, STRUCT)
+    structdesc = rcontainer.StructTypeDesc(FakeRGenOp, STRUCT)
     return structdesc.fielddesc_by_name[name]

Modified: pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rcontainer.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rcontainer.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rcontainer.py	Sat Mar  1 22:43:02 2008
@@ -2,7 +2,7 @@
 from pypy.jit.timeshifter import rvalue, rcontainer
 from pypy.jit.timeshifter.test.support import FakeJITState, FakeGenVar
 from pypy.jit.timeshifter.test.support import FakeGenConst
-from pypy.jit.timeshifter.test.support import fakehrtyper, signed_kind
+from pypy.jit.timeshifter.test.support import signed_kind
 from pypy.jit.timeshifter.test.support import vmalloc, makebox
 from pypy.jit.timeshifter.test.support import getfielddesc
 

Modified: pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rvalue.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rvalue.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_rvalue.py	Sat Mar  1 22:43:02 2008
@@ -60,7 +60,7 @@
     V0 = FakeGenVar()
     box = rvalue.PtrRedBox("dummy pointer", V0)
     STRUCT = lltype.Struct("dummy", ("foo", lltype.Signed))
-    desc = rcontainer.StructFieldDesc(FakeHRTyper(), lltype.Ptr(STRUCT), "foo", 0)
+    desc = rcontainer.StructFieldDesc(FakeRGenOp, lltype.Ptr(STRUCT), "foo", 0)
     box2 = box.op_getfield(jitstate, desc)
     V1 = box2.genvar
     assert box.known_nonzero



More information about the Pypy-commit mailing list