[pypy-svn] r31451 - pypy/dist/pypy/jit/timeshifter/test
arigo at codespeak.net
arigo at codespeak.net
Mon Aug 21 19:53:21 CEST 2006
Author: arigo
Date: Mon Aug 21 19:53:19 2006
New Revision: 31451
Modified:
pypy/dist/pypy/jit/timeshifter/test/test_timeshift.py
Log:
Another test, already passing.
Modified: pypy/dist/pypy/jit/timeshifter/test/test_timeshift.py
==============================================================================
--- pypy/dist/pypy/jit/timeshifter/test/test_timeshift.py (original)
+++ pypy/dist/pypy/jit/timeshifter/test/test_timeshift.py Mon Aug 21 19:53:19 2006
@@ -578,3 +578,14 @@
insns, res = timeshift(ll_function, [5], [], policy=P_NOVIRTUAL)
assert res == 11
assert insns == {'int_add': 2}
+
+def test_call_3():
+ def ll_add_one(x):
+ return x + 1
+ def ll_two(x):
+ return ll_add_one(ll_add_one(x)) - x
+ def ll_function(y):
+ return ll_two(y) * y
+ insns, res = timeshift(ll_function, [5], [], policy=P_NOVIRTUAL)
+ assert res == 10
+ assert insns == {'int_add': 2, 'int_sub': 1, 'int_mul': 1}
More information about the Pypy-commit
mailing list