[pypy-svn] r36748 - pypy/dist/pypy/jit/codegen/test

arigo at codespeak.net arigo at codespeak.net
Sun Jan 14 17:44:18 CET 2007


Author: arigo
Date: Sun Jan 14 17:44:17 2007
New Revision: 36748

Modified:
   pypy/dist/pypy/jit/codegen/test/operation_tests.py
Log:
Harder tests - shifts of >= 32 bits.


Modified: pypy/dist/pypy/jit/codegen/test/operation_tests.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/test/operation_tests.py	(original)
+++ pypy/dist/pypy/jit/codegen/test/operation_tests.py	Sun Jan 14 17:44:17 2007
@@ -2,7 +2,7 @@
 from pypy.translator.translator import TranslationContext, graphof
 from pypy.jit.codegen import graph2rgenop
 from pypy.rpython.lltypesystem import lltype
-from pypy.rlib.rarithmetic import r_uint
+from pypy.rlib.rarithmetic import r_uint, intmask
 from ctypes import cast, c_void_p, CFUNCTYPE, c_int, c_float
 from pypy import conftest
 
@@ -45,8 +45,10 @@
                    lambda x, y: abs(-x),
                    ]:
             fp = self.rgen(fn, [int, int])
-            assert fp(40, 2) == fn(40, 2)
-            assert fp(25, 3) == fn(25, 3)
+            assert fp(40, 2) == intmask(fn(40, 2))
+            assert fp(25, 3) == intmask(fn(25, 3))
+            assert fp(149, 32) == intmask(fn(149, 32))
+            assert fp(149, 33) == intmask(fn(149, 33))
 
     def test_comparison(self):
         for fn in [lambda x, y: int(x <  y),



More information about the Pypy-commit mailing list