def test_nonint_types(self):
    result = self.fail_fields(('a', c_char_p, 1))
    assert (result == (TypeError, 'bit fields not allowed for type c_char_p'))
    result = self.fail_fields(('a', c_void_p, 1))
    assert (result == (TypeError, 'bit fields not allowed for type c_void_p'))
    if (c_int != c_long):
        result = self.fail_fields(('a', POINTER(c_int), 1))
        assert (result == (TypeError, 'bit fields not allowed for type LP_c_int'))
    result = self.fail_fields(('a', c_char, 1))
    assert (result == (TypeError, 'bit fields not allowed for type c_char'))
    try:
        c_wchar
    except NameError:
        pass
    else:
        result = self.fail_fields(('a', c_wchar, 1))
        assert (result == (TypeError, 'bit fields not allowed for type c_wchar'))

    class Dummy(Structure):
        _fields_ = []
    result = self.fail_fields(('a', Dummy, 1))
    assert (result == (TypeError, 'bit fields not allowed for type Dummy'))
def test_nonint_types(self):
    result = self.fail_fields(('a', c_char_p, 1))
    assert (result == (TypeError, 'bit fields not allowed for type c_char_p'))
    result = self.fail_fields(('a', c_void_p, 1))
    assert (result == (TypeError, 'bit fields not allowed for type c_void_p'))
    if (c_int != c_long):
        result = self.fail_fields(('a', POINTER(c_int), 1))
        assert (result == (TypeError, 'bit fields not allowed for type LP_c_int'))
    result = self.fail_fields(('a', c_char, 1))
    assert (result == (TypeError, 'bit fields not allowed for type c_char'))
    try:
        c_wchar
    except NameError:
        pass
    else:
        result = self.fail_fields(('a', c_wchar, 1))
        assert (result == (TypeError, 'bit fields not allowed for type c_wchar'))

    class Dummy(Structure):
        _fields_ = []
    result = self.fail_fields(('a', Dummy, 1))
    assert (result == (TypeError, 'bit fields not allowed for type Dummy'))