[pypy-svn] r66119 - pypy/trunk/pypy/rpython/test
antocuni at codespeak.net
antocuni at codespeak.net
Sat Jul 4 16:03:52 CEST 2009
Author: antocuni
Date: Sat Jul 4 16:03:52 2009
New Revision: 66119
Modified:
pypy/trunk/pypy/rpython/test/test_rfloat.py
Log:
(bbrazil)
- r_longlong becomes int on a 64bit system, so update
test_longlong_conversion to handle this
Modified: pypy/trunk/pypy/rpython/test/test_rfloat.py
==============================================================================
--- pypy/trunk/pypy/rpython/test/test_rfloat.py (original)
+++ pypy/trunk/pypy/rpython/test/test_rfloat.py Sat Jul 4 16:03:52 2009
@@ -2,7 +2,7 @@
from pypy.translator.translator import TranslationContext
from pypy.rpython.test import snippet
from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
-from pypy.rlib.rarithmetic import r_uint, r_longlong, r_singlefloat,\
+from pypy.rlib.rarithmetic import r_int, r_uint, r_longlong, r_singlefloat,\
isnan, isinf
class TestSnippet(object):
@@ -76,12 +76,17 @@
assert res == fn(2.34)
def test_longlong_conversion(self):
+ import sys
def fn(f):
return r_longlong(f)
res = self.interpret(fn, [1.0])
assert res == 1
- assert self.is_of_type(res, r_longlong)
+ # r_longlong is int on a 64 bit system
+ if sys.maxint == 2**63 - 1:
+ assert self.is_of_type(res, int)
+ else:
+ assert self.is_of_type(res, r_longlong)
res = self.interpret(fn, [2.34])
assert res == fn(2.34)
big = float(0x7fffffffffffffff)
More information about the Pypy-commit
mailing list