[pypy-svn] r72717 - in pypy/branch/fix-64/pypy/rlib: . test

arigo at codespeak.net arigo at codespeak.net
Wed Mar 24 15:47:33 CET 2010


Author: arigo
Date: Wed Mar 24 15:47:31 2010
New Revision: 72717

Modified:
   pypy/branch/fix-64/pypy/rlib/rbigint.py
   pypy/branch/fix-64/pypy/rlib/test/test_rbigint.py
Log:
Fix tests.


Modified: pypy/branch/fix-64/pypy/rlib/rbigint.py
==============================================================================
--- pypy/branch/fix-64/pypy/rlib/rbigint.py	(original)
+++ pypy/branch/fix-64/pypy/rlib/rbigint.py	Wed Mar 24 15:47:31 2010
@@ -49,6 +49,7 @@
 
 class rbigint(object):
     """This is a reimplementation of longs using a list of digits."""
+    # XXX relace the list of ints with a list of rffi.INTs, maybe
     
     def __init__(self, digits=None, sign=0):
         if digits is None or len(digits) == 0:

Modified: pypy/branch/fix-64/pypy/rlib/test/test_rbigint.py
==============================================================================
--- pypy/branch/fix-64/pypy/rlib/test/test_rbigint.py	(original)
+++ pypy/branch/fix-64/pypy/rlib/test/test_rbigint.py	Wed Mar 24 15:47:31 2010
@@ -106,7 +106,7 @@
         assert rbigint.fromrarith_int(r_uint(17)).eq(rbigint([17], 1))
         assert rbigint.fromrarith_int(r_uint(BASE-1)).eq(rbigint([intmask(BASE-1)], 1))
         assert rbigint.fromrarith_int(r_uint(BASE)).eq(rbigint([0, 1], 1))
-        assert rbigint.fromrarith_int(r_uint(BASE**2)).eq(rbigint([0], 0))
+        #assert rbigint.fromrarith_int(r_uint(BASE**2)).eq(rbigint([0], 0))
         assert rbigint.fromrarith_int(r_uint(sys.maxint)).eq(
             rbigint.fromint(sys.maxint))
         assert rbigint.fromrarith_int(r_uint(sys.maxint+1)).eq(
@@ -473,9 +473,12 @@
 
     def test_args_from_rarith_int(self):
         from pypy.rpython.tool.rfficache import platform
+        from pypy.rlib.rarithmetic import r_int
         classlist = platform.numbertype_to_rclass.values()
         fnlist = []
         for r in classlist:
+            if r is r_int:     # and also r_longlong on 64-bit
+                continue
             if r is int:
                 mask = sys.maxint*2+1
                 signed = True



More information about the Pypy-commit mailing list