[pypy-svn] r78165 - pypy/trunk/pypy/rlib/test
antocuni at codespeak.net
antocuni at codespeak.net
Thu Oct 21 13:46:17 CEST 2010
Author: antocuni
Date: Thu Oct 21 13:46:15 2010
New Revision: 78165
Modified:
pypy/trunk/pypy/rlib/test/test_libffi.py
Log:
checkin this test which passes on 32bit, but I expect it to fail on 64
Modified: pypy/trunk/pypy/rlib/test/test_libffi.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_libffi.py (original)
+++ pypy/trunk/pypy/rlib/test/test_libffi.py Thu Oct 21 13:46:15 2010
@@ -173,6 +173,19 @@
res = self.call(func, [chr(20), 22], rffi.LONG)
assert res == 42
+ def test_unsigned_short_args(self):
+ """
+ unsigned short sum_xy_us(unsigned short x, unsigned short y)
+ {
+ return x+y;
+ }
+ """
+ libfoo = self.get_libfoo()
+ func = (libfoo, 'sum_xy_us', [types.ushort, types.ushort], types.ushort)
+ res = self.call(func, [32000, 8000], rffi.USHORT)
+ assert res == 40000
+
+
def test_pointer_as_argument(self):
"""#include <stdlib.h>
long inc(long* x)
More information about the Pypy-commit
mailing list