Author: Armin Rigo <ar...@tunes.org>
Branch: remove-globals-in-jit
Changeset: r59739:89cbe267edc1
Date: 2013-01-05 18:14 +0100
http://bitbucket.org/pypy/pypy/changeset/89cbe267edc1/

Log:    A minimal test for the previous checkin. That's the effect that we
        really want, but the test is really a unit test only.

diff --git a/pypy/rpython/memory/gctransform/test/test_framework.py 
b/pypy/rpython/memory/gctransform/test/test_framework.py
--- a/pypy/rpython/memory/gctransform/test/test_framework.py
+++ b/pypy/rpython/memory/gctransform/test/test_framework.py
@@ -2,6 +2,7 @@
 from pypy.annotation.model import SomeInteger
 from pypy.objspace.flow.model import Constant, SpaceOperation
 from pypy.rpython.lltypesystem import lltype, rffi
+from pypy.rpython.lltypesystem.lloperation import llop
 from pypy.rpython.memory.gc.semispace import SemiSpaceGC
 from pypy.rpython.memory.gctransform.framework import (CollectAnalyzer,
      find_initializing_stores, find_clean_setarrayitems)
@@ -96,6 +97,13 @@
     gg = graphof(t, g)
     assert CollectAnalyzer(t).analyze_direct_call(gg)
 
+def test_cancollect_some_operation():
+    def g():
+        llop.gc_set_extra_threshold(lltype.Void, 32)
+    t = rtype(g, [])
+    gg = graphof(t, g)
+    assert CollectAnalyzer(t).analyze_direct_call(gg)
+
 def test_no_collect():
     from pypy.rlib import rgc
     from pypy.translator.c.genc import CStandaloneBuilder
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to