[pypy-svn] r79745 - pypy/trunk/pypy/rpython/memory/gc/test

arigo at codespeak.net arigo at codespeak.net
Thu Dec 2 14:12:41 CET 2010


Author: arigo
Date: Thu Dec  2 14:12:38 2010
New Revision: 79745

Modified:
   pypy/trunk/pypy/rpython/memory/gc/test/test_direct.py
Log:
Add a test, failing with the minimark gc.


Modified: pypy/trunk/pypy/rpython/memory/gc/test/test_direct.py
==============================================================================
--- pypy/trunk/pypy/rpython/memory/gc/test/test_direct.py	(original)
+++ pypy/trunk/pypy/rpython/memory/gc/test/test_direct.py	Thu Dec  2 14:12:38 2010
@@ -342,6 +342,15 @@
             self.gc.collect()
             assert hash == self.gc.identityhash(self.stackroots[-1])
             self.stackroots.pop()
+        # (7) the same, but the objects are dying young
+        for i in range(10):
+            self.gc.collect()
+            p = self.malloc(VAR, i)
+            self.stackroots.append(p)
+            hash1 = self.gc.identityhash(p)
+            hash2 = self.gc.identityhash(p)
+            assert hash1 == hash2
+            self.stackroots.pop()
 
     def test_memory_alignment(self):
         A1 = lltype.GcArray(lltype.Char)



More information about the Pypy-commit mailing list