Commits

Armin Rigo committed 185c73a

Fix test_newgc.

Comments (0)

Files changed (3)

rpython/memory/test/snippet.py

 from rpython.rlib import rgc
 
 
-class SemiSpaceGCTestDefines:
+class SnippetTestDefines:
     large_tests_ok = False
 
     def definestr_finalizer_order(cls):
         res = self.run('from_objwithfinalizer_to_youngobj')
         assert res == 1
 
-class SemiSpaceGCTests(SemiSpaceGCTestDefines):
+class SnippetTests(SnippetTestDefines):
     # xxx messy
 
     def run(self, name): # for test_gc.py

rpython/memory/test/test_minimark_gc.py

 
 WORD = LONG_BIT // 8
 
-class TestMiniMarkGC(GCTest, snippet.SemiSpaceGCTests):
+class TestMiniMarkGC(GCTest, snippet.SnippetTests):
     from rpython.memory.gc.minimark import MiniMarkGC as GCClass
     GC_CAN_MOVE = True
     GC_CAN_SHRINK_ARRAY = True

rpython/translator/c/test/test_newgc.py

         self.run("gcflag_extra")
 
 
-class TestSemiSpaceGC(UsingFrameworkTest, snippet.SemiSpaceGCTestDefines):
-    gcpolicy = "semispace"
+class MovingGCTests(UsingFrameworkTest, snippet.SnippetTestDefines):
     should_be_moving = True
     GC_CAN_MOVE = True
-    GC_CAN_MALLOC_NONMOVABLE = False
+    GC_CAN_MALLOC_NONMOVABLE = True
     GC_CAN_SHRINK_ARRAY = True
 
     # for snippets
         assert res >= 195
 
 
-class TestGenerationalGC(TestSemiSpaceGC):
-    gcpolicy = "generation"
-    should_be_moving = True
+# ____________________________________________________________________
 
 
-class TestHybridGC(TestGenerationalGC):
-    gcpolicy = "hybrid"
-    should_be_moving = True
-    GC_CAN_MALLOC_NONMOVABLE = True
-
-    def test_gc_set_max_heap_size(self):
-        py.test.skip("not implemented")
-
-
-class TestHybridGCRemoveTypePtr(TestHybridGC):
-    removetypeptr = True
-
-
-class TestMiniMarkGC(TestSemiSpaceGC):
+class TestMiniMarkGC(MovingGCTests):
     gcpolicy = "minimark"
-    should_be_moving = True
-    GC_CAN_MALLOC_NONMOVABLE = True
-    GC_CAN_SHRINK_ARRAY = True
 
     def test_gc_heap_stats(self):
         py.test.skip("not implemented")
         res = self.run("nongc_opaque_attached_to_gc")
         assert res == 0
 
+
 # ____________________________________________________________________
 
+
 class TaggedPointersTest(object):
     taggedpointers = True
 
         return self.smallint + x + 3
 
 
-class TestHybridTaggedPointers(TaggedPointersTest, TestHybridGC):
-    pass
-
-
-class TestMiniMarkGCMostCompact(TaggedPointersTest, TestMiniMarkGC):
+class TestMiniMarkGCTaggedPointersAndRemoveTypePtr(TaggedPointersTest,
+                                                   TestMiniMarkGC):
     removetypeptr = True