8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b428a1 commit f2e6432Copy full SHA for f2e6432
Lib/test/test_ctypes/test_bitfields.py
@@ -236,6 +236,26 @@ class X(Structure):
236
else:
237
self.assertEqual(sizeof(X), sizeof(c_int) * 2)
238
239
+ def test_mixed_5(self):
240
+ class X(Structure):
241
+ _fields_ = [
242
+ ('A', c_uint, 1),
243
+ ('B', c_ushort, 16)]
244
+ a = X()
245
+ a.A = 0
246
+ a.B = 1
247
+ self.assertEqual(1, a.B)
248
+
249
+ def test_mixed_6(self):
250
251
252
+ ('A', c_ulonglong, 1),
253
+ ('B', c_uint, 32)]
254
255
256
257
258
259
def test_anon_bitfields(self):
260
# anonymous bit-fields gave a strange error message
261
class X(Structure):
0 commit comments