[pypy-svn] r74469 - pypy/trunk/pypy/module/pypyjit/test
arigo at codespeak.net
arigo at codespeak.net
Mon May 10 16:30:17 CEST 2010
Author: arigo
Date: Mon May 10 16:30:15 2010
New Revision: 74469
Modified:
pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
issue529 in-progress
Add a test that fails.
Modified: pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
==============================================================================
--- pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py (original)
+++ pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py Mon May 10 16:30:15 2010
@@ -603,6 +603,18 @@
# XXX I would like here to say that it's 0, but unfortunately
# call that can raise is not exchanged into getarrayitem_gc
+ def test_overflow_checking(self):
+ self.run_source('''
+ def main():
+ def f(a,b):
+ if a < 0: return -1
+ return a-b
+ total = 0
+ for i in range(100000):
+ total += f(i, 5)
+ return total
+ ''', 100, ([], 4999450000L))
+
class AppTestJIT(PyPyCJITTests):
def setup_class(cls):
if not option.runappdirect:
More information about the Pypy-commit
mailing list