diff options
Diffstat (limited to 'tests/expectations/vtable_recursive_sig.rs')
-rw-r--r-- | tests/expectations/vtable_recursive_sig.rs | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/tests/expectations/vtable_recursive_sig.rs b/tests/expectations/vtable_recursive_sig.rs index 8f972e92..1044c4e4 100644 --- a/tests/expectations/vtable_recursive_sig.rs +++ b/tests/expectations/vtable_recursive_sig.rs @@ -6,31 +6,30 @@ #[repr(C)] #[derive(Debug, Copy)] -pub struct Base { - pub _vftable: *const _vftable_Base, +pub struct Derived { + pub _base: Base, } -#[repr(C)] -pub struct _vftable_Base { - pub AsDerived: unsafe extern "C" fn(this: *mut ::std::os::raw::c_void) - -> *mut Derived, +#[test] +fn bindgen_test_layout_Derived() { + assert_eq!(::std::mem::size_of::<Derived>() , 8usize); + assert_eq!(::std::mem::align_of::<Derived>() , 8usize); } -impl ::std::clone::Clone for Base { +impl Clone for Derived { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_Base() { - assert_eq!(::std::mem::size_of::<Base>() , 8usize); - assert_eq!(::std::mem::align_of::<Base>() , 8usize); +#[repr(C)] +pub struct bindgen_vtable__bindgen_id_2 { } #[repr(C)] #[derive(Debug, Copy)] -pub struct Derived { - pub _base: Base, +pub struct Base { + pub vtable_: *const bindgen_vtable__bindgen_id_2, } -#[repr(C)] -pub struct _vftable_Derived { - pub _base: _vftable_Base, +#[test] +fn bindgen_test_layout_Base() { + assert_eq!(::std::mem::size_of::<Base>() , 8usize); + assert_eq!(::std::mem::align_of::<Base>() , 8usize); } -impl ::std::clone::Clone for Derived { +impl Clone for Base { fn clone(&self) -> Self { *self } } |