[pypy-svn] r5391 - pypy/trunk/src/pypy/objspace/std/test
hpk at codespeak.net
hpk at codespeak.net
Tue Jun 29 19:03:41 CEST 2004
Author: hpk
Date: Tue Jun 29 19:03:34 2004
New Revision: 5391
Modified:
pypy/trunk/src/pypy/objspace/std/test/test_restricted_int.py
Log:
fix masking with maxint-stuff for 64-bit machines
Modified: pypy/trunk/src/pypy/objspace/std/test/test_restricted_int.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/test_restricted_int.py (original)
+++ pypy/trunk/src/pypy/objspace/std/test/test_restricted_int.py Tue Jun 29 19:03:34 2004
@@ -2,6 +2,9 @@
import autopath
from pypy.tool import testit
from pypy.objspace.std.restricted_int import *
+import sys
+
+maxint_mask = (sys.maxint*2 + 1)
class Test_r_int(testit.TestCase):
@@ -109,12 +112,12 @@
def unary_test(self, f):
for arg in (0, 3, 12345):
- res = f(arg) & 0xffffffffl
+ res = f(arg) & maxint_mask
cmp = f(r_uint(arg))
self.assertEquals(res, cmp)
def binary_test(self, f, rargs = None):
- mask = 0xffffffffl
+ mask = maxint_mask
if not rargs:
rargs = (1, 3, 55)
for larg in (0, 1, 2, 3, 1234):
More information about the Pypy-commit
mailing list