[pypy-commit] pypy default: Add a passing test that rgc.ll_arraycopy cannot raise.

arigo noreply at buildbot.pypy.org
Tue Nov 8 13:21:20 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r48918:0f2d4f02b0e3
Date: 2011-11-08 12:28 +0100
http://bitbucket.org/pypy/pypy/changeset/0f2d4f02b0e3/

Log:	Add a passing test that rgc.ll_arraycopy cannot raise.

diff --git a/pypy/translator/backendopt/test/test_canraise.py b/pypy/translator/backendopt/test/test_canraise.py
--- a/pypy/translator/backendopt/test/test_canraise.py
+++ b/pypy/translator/backendopt/test/test_canraise.py
@@ -201,6 +201,16 @@
         result = ra.can_raise(ggraph.startblock.operations[0])
         assert result
 
+    def test_ll_arraycopy(self):
+        from pypy.rpython.lltypesystem import rffi
+        from pypy.rlib.rgc import ll_arraycopy
+        def f(a, b, c, d, e):
+            ll_arraycopy(a, b, c, d, e)
+        t, ra = self.translate(f, [rffi.CCHARP, rffi.CCHARP, int, int, int])
+        fgraph = graphof(t, f)
+        result = ra.can_raise(fgraph.startblock.operations[0])
+        assert not result
+
 
 class TestOOType(OORtypeMixin, BaseTestCanRaise):
     def test_can_raise_recursive(self):


More information about the pypy-commit mailing list