Commits

David Schneider  committed 82cd386

add tests for edgecases of longlong bitfields that fail on 32bit

  • Participants
  • Parent commits ec54480

Comments (0)

Files changed (1)

File pypy/module/test_lib_pypy/ctypes_tests/test_bitfields.py

         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),
         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: