[pypy-commit] pypy default: a failing test on 32bit

antocuni noreply at buildbot.pypy.org
Tue May 22 16:09:27 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r55157:09525a5ec13d
Date: 2012-05-22 15:43 +0200
http://bitbucket.org/pypy/pypy/changeset/09525a5ec13d/

Log:	a failing test on 32bit

diff --git a/pypy/module/_ffi/test/test_funcptr.py b/pypy/module/_ffi/test/test_funcptr.py
--- a/pypy/module/_ffi/test/test_funcptr.py
+++ b/pypy/module/_ffi/test/test_funcptr.py
@@ -338,6 +338,22 @@
         assert sum_xy(100, 40) == 140
         assert sum_xy(200, 60) == 260 % 256
 
+    def test_unsigned_int_args(self):
+        r"""
+            DLLEXPORT unsigned int sum_xy_ui(unsigned int x, unsigned int y)
+            {
+                return x+y;
+            }
+        """
+        import sys
+        from _ffi import CDLL, types
+        maxint32 = 2147483647
+        libfoo = CDLL(self.libfoo_name)
+        sum_xy = libfoo.getfunc('sum_xy_ui', [types.uint, types.uint],
+                                types.uint)
+        assert sum_xy(maxint32, 1) == maxint32+1
+        assert sum_xy(maxint32, maxint32+2) == 0
+
     def test_signed_byte_args(self):
         """
             DLLEXPORT signed char sum_xy_sb(signed char x, signed char y)


More information about the pypy-commit mailing list