[pypy-svn] r78168 - pypy/trunk/pypy/module/pypyjit/test

arigo at codespeak.net arigo at codespeak.net
Thu Oct 21 13:54:09 CEST 2010


Author: arigo
Date: Thu Oct 21 13:54:07 2010
New Revision: 78168

Modified:
   pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
Fix the test on 64 bits.


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	Thu Oct 21 13:54:07 2010
@@ -608,16 +608,17 @@
         #     call that can raise is not exchanged into getarrayitem_gc
 
     def test_overflow_checking(self):
+        startvalue = sys.maxint - 2147483647
         self.run_source('''
         def main():
             def f(a,b):
                 if a < 0: return -1
                 return a-b
-            total = 0
+            total = %d
             for i in range(100000):
                 total += f(i, 5)
             return total
-        ''', 170, ([], 4999450000L))
+        ''' % startvalue, 170, ([], startvalue + 4999450000L))
 
     def test_boolrewrite_invers(self):
         for a, b, res, ops in (('2000', '2000', 20001000, 51),



More information about the Pypy-commit mailing list