Author: David Schneider <david.schnei...@picle.org> Branch: Changeset: r64938:82cd3868d29c Date: 2013-06-18 04:00 -0500 http://bitbucket.org/pypy/pypy/changeset/82cd3868d29c/
Log: add tests for edgecases of longlong bitfields that fail on 32bit diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py b/pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py --- a/pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py +++ b/pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py @@ -66,6 +66,10 @@ x.a, x.b, x.c = -1, 7, -1 assert (x.a, x.b, x.c) == (-1, 7, -1) + x = X() + x.a, x.b, x.c = -1, -7, -1 + assert (x.a, x.b, x.c) == (-1, -7, -1) + def test_ulonglong(self): class X(Structure): _fields_ = [("a", c_ulonglong, 1), @@ -75,8 +79,8 @@ assert sizeof(X) == sizeof(c_longlong) x = X() assert (x.a, x.b, x.c) == (0, 0, 0) - x.a, x.b, x.c = 7, 7, 7 - assert (x.a, x.b, x.c) == (1, 7, 1) + x.a, x.b, x.c = 7, 2305843009213693953, 7 + assert (x.a, x.b, x.c) == (1, 2305843009213693953, 1) def test_signed(self): for c_typ in signed_int_types: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit