[pypy-svn] pypy default: improve this test
antocuni
commits-noreply at bitbucket.org
Tue Feb 22 17:41:32 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r42212:2e06bb0dd762
Date: 2011-02-22 17:19 +0100
http://bitbucket.org/pypy/pypy/changeset/2e06bb0dd762/
Log: improve this test
diff --git a/pypy/module/pypyjit/test_pypy_c/test_model.py b/pypy/module/pypyjit/test_pypy_c/test_model.py
--- a/pypy/module/pypyjit/test_pypy_c/test_model.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_model.py
@@ -176,8 +176,10 @@
def test_match_by_id(self):
def f():
i = 0
+ j = 2000
while i < 1003:
i += 1 # ID: increment
+ j -= 1 # ID: product
a = 0 # to make sure that JUMP_ABSOLUTE is not part of the ID
return i
#
@@ -186,3 +188,7 @@
assert loop.match_by_id('increment', """
i1 = int_add(i0, 1)
""")
+ assert loop.match_by_id('product', """
+ i4 = int_sub_ovf(i3, 1)
+ guard_no_overflow()
+ """)
More information about the Pypy-commit
mailing list