

def test_typedef():
    ffi = FFI(backend=FakeBackend())
    ffi.cdef('\n        typedef unsigned int UInt;\n        typedef UInt UIntReally;\n        UInt foo(void);\n        ')
    C = ffi.dlopen(None)
    assert (str(ffi.typeof('UIntReally')) == '<unsigned int>')
    assert (C.foo.BType == '<func (), <unsigned int>, False>')

dataset/ETHPy150Open johncsnyder/SwiftKitten/cffi/testing/cffi0/test_parsing.py test_typedef/original