[pypy-svn] pypy default: one more test
antocuni
commits-noreply at bitbucket.org
Wed Mar 16 18:06:34 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r42719:f1946cab282d
Date: 2011-03-16 15:15 +0100
http://bitbucket.org/pypy/pypy/changeset/f1946cab282d/
Log: one more test
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -697,3 +697,25 @@
i20 = int_is_true(i19)
guard_false(i20, descr=<Guard8>)
""")
+
+ def test_arraycopy_disappears(self):
+ def main(n):
+ i = 0
+ while i < n:
+ t = (1, 2, 3, i + 1)
+ t2 = t[:]
+ del t
+ i = t2[3]
+ del t2
+ return i
+ #
+ log = self.run(main, [500], threshold=400)
+ assert log.result == 500
+ loop, = log.loops_by_filename(self.filepath)
+ assert loop.match("""
+ i7 = int_lt(i5, i6)
+ guard_true(i7, descr=<Guard3>)
+ i9 = int_add(i5, 1)
+ --TICK--
+ jump(p0, p1, p2, p3, p4, i9, i6, descr=<Loop0>)
+ """)
More information about the Pypy-commit
mailing list