Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r48919:a800076e6e9c
Date: 2011-11-08 12:33 +0100
http://bitbucket.org/pypy/pypy/changeset/a800076e6e9c/

Log:    Add a test here. *Still* passing.

diff --git a/pypy/jit/metainterp/test/test_ajit.py 
b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -3678,3 +3678,16 @@
         assert x == -42
         x = self.interp_operations(f, [1000, 1], translationoptions=topt)
         assert x == 999
+
+    def test_ll_arraycopy(self):
+        from pypy.rlib import rgc
+        A = lltype.GcArray(lltype.Char)
+        a = lltype.malloc(A, 10)
+        for i in range(10): a[i] = chr(i)
+        b = lltype.malloc(A, 10)
+        #
+        def f(c, d, e):
+            rgc.ll_arraycopy(a, b, c, d, e)
+            return 42
+        self.interp_operations(f, [1, 2, 3])
+        self.check_operations_history(call=1, guard_no_exception=0)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to