#NEWLINE# def test_verify_exact_field_offset( ) : #NEWLINE# #INDENT# ffi = FFI ( ) #NEWLINE# ffi . cdef ( 'struct foo_s { int b; short a; };' ) #NEWLINE# lib = verify ( ffi , 'test_verify_exact_field_offset' , 'struct foo_s { short a; int b; };' ) #NEWLINE# e = py . test . raises ( ffi . error , ffi . new , 'struct foo_s *' , [ ] ) #NEWLINE# assert ( str ( e . value ) == 'struct foo_s: wrong offset for field \'b\' (cdef says 0, but C compiler says 4). fix it or use "...;" in the cdef for struct foo_s to make it flexible' )