def test_unsigned(self):
    for c_typ in unsigned_int_types:

        class X(Structure):
            _fields_ = [('a', c_typ, 3), ('b', c_typ, 3), ('c', c_typ, 1)]
        assert (sizeof(X) == sizeof(c_typ))
        x = X()
        assert ((c_typ, x.a, x.b, x.c) == (c_typ, 0, 0, 0))
        x.a = (- 1)
        assert ((c_typ, x.a, x.b, x.c) == (c_typ, 7, 0, 0))
        (x.a, x.b) = (0, (- 1))
        assert ((c_typ, x.a, x.b, x.c) == (c_typ, 0, 7, 0))
def test_unsigned(self):
    for c_typ in unsigned_int_types:

        class X(Structure):
            _fields_ = [('a', c_typ, 3), ('b', c_typ, 3), ('c', c_typ, 1)]
        assert (sizeof(X) == sizeof(c_typ))
        x = X()
        assert ((c_typ, x.a, x.b, x.c) == (c_typ, 0, 0, 0))
        x.a = (- 1)
        assert ((c_typ, x.a, x.b, x.c) == (c_typ, 7, 0, 0))
        (x.a, x.b) = (0, (- 1))
        assert ((c_typ, x.a, x.b, x.c) == (c_typ, 0, 7, 0))