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

arigo at codespeak.net arigo at codespeak.net
Sat Dec 4 15:33:15 CET 2010


Author: arigo
Date: Sat Dec  4 15:33:13 2010
New Revision: 79812

Modified:
   pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
Fix test_pypy_c for arrays 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	Sat Dec  4 15:33:13 2010
@@ -885,11 +885,14 @@
     def test_array_sum(self):
         for tc, maxops in zip('bhilBHILfd', (38,) * 6 + (40, 40, 41, 38)):
             res = 19352859
-            if tc in 'IL':
+            if tc == 'L':
                 res = long(res)
             elif tc in 'fd':
                 res = float(res)
-            
+            elif tc == 'I' and sys.maxint == 2147483647:
+                res = long(res)
+                # note: in CPython we always get longs here, even on 64-bits
+
             self.run_source('''
             from array import array
 
@@ -937,11 +940,14 @@
             print '='*65
             print '='*20, 'running test for tc=%r' % (tc,), '='*20
             res = 73574560
-            if tc in 'IL':
+            if tc == 'L':
                 res = long(res)
             elif tc in 'fd':
                 res = float(res)
-            
+            elif tc == 'I' and sys.maxint == 2147483647:
+                res = long(res)
+                # note: in CPython we always get longs here, even on 64-bits
+
             self.run_source('''
             from array import array
 



More information about the Pypy-commit mailing list