[pypy-commit] pypy stackroot-speedup: a failing test

arigo noreply at buildbot.pypy.org
Sun Jan 29 19:56:59 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stackroot-speedup
Changeset: r51954:fb3badd51945
Date: 2012-01-29 13:03 +0100
http://bitbucket.org/pypy/pypy/changeset/fb3badd51945/

Log:	a failing test

diff --git a/pypy/translator/c/test/test_newgc.py b/pypy/translator/c/test/test_newgc.py
--- a/pypy/translator/c/test/test_newgc.py
+++ b/pypy/translator/c/test/test_newgc.py
@@ -1185,6 +1185,22 @@
         assert data.startswith('member0')
         assert 'GcArray of * GcStruct S {' in data
 
+    def define_recursive_function(self):
+        def f_rec(n):
+            if n < 2:
+                rgc.collect()
+                return 1
+            else:
+                return f_rec(n-1) + f_rec(n-2)
+        def fn():
+            print f_rec(10)
+            return 0
+        return fn
+
+    def test_recursive_function(self):
+        self.run("recursive_function")
+
+
 class TestSemiSpaceGC(TestUsingFramework, snippet.SemiSpaceGCTestDefines):
     gcpolicy = "semispace"
     should_be_moving = True


More information about the pypy-commit mailing list