[pypy-svn] r79681 - pypy/branch/jit-free-asm2/pypy/jit/backend/llsupport/test

arigo at codespeak.net arigo at codespeak.net
Tue Nov 30 15:41:25 CET 2010


Author: arigo
Date: Tue Nov 30 15:41:23 2010
New Revision: 79681

Modified:
   pypy/branch/jit-free-asm2/pypy/jit/backend/llsupport/test/test_asmmemmgr.py
Log:
Fix the test.


Modified: pypy/branch/jit-free-asm2/pypy/jit/backend/llsupport/test/test_asmmemmgr.py
==============================================================================
--- pypy/branch/jit-free-asm2/pypy/jit/backend/llsupport/test/test_asmmemmgr.py	(original)
+++ pypy/branch/jit-free-asm2/pypy/jit/backend/llsupport/test/test_asmmemmgr.py	Tue Nov 30 15:41:23 2010
@@ -152,14 +152,10 @@
                     prev_total = new_total
 
     def test_insert_gcroot_marker(self):
+        puts = []
         class FakeGcRootMap:
-            def add_raw_gcroot_markers(self, asmmemmgr, allblocks, markers,
-                                       total_size, rawstart):
-                self.asmmemmgr = asmmemmgr
-                self.allblocks = allblocks
-                self.markers = markers
-                self.total_size = total_size
-                self.rawstart = rawstart
+            def put(self, retaddr, mark):
+                puts.append((retaddr, mark))
         #
         mc = BlockBuilderMixin()
         mc.writechar('X')
@@ -182,10 +178,8 @@
         assert p[4] == 'Z'
         assert p[5] == 'z'
         assert allblocks == [(rawstart, rawstart + 6)]
-        assert gcrootmap.markers == [(2, ['a', 'b', 'c', 'd']),
-                                     (4, ['e', 'f', 'g'])]
-        assert gcrootmap.total_size == 4 + 3
-        assert gcrootmap.rawstart == rawstart
+        assert puts == [(rawstart + 2, ['a', 'b', 'c', 'd']),
+                        (rawstart + 4, ['e', 'f', 'g'])]
 
 
 def test_blockbuildermixin(translated=True):



More information about the Pypy-commit mailing list