|
| 1 | +/* automatically generated by rust-bindgen */ |
| 2 | + |
| 3 | + |
| 4 | +#![allow(non_snake_case)] |
| 5 | + |
| 6 | + |
| 7 | +#[repr(C)] |
| 8 | +#[derive(Debug, Default, Copy)] |
| 9 | +pub struct Foo { |
| 10 | + pub bar: Foo_Bar, |
| 11 | +} |
| 12 | +#[repr(C)] |
| 13 | +#[derive(Debug, Default, Copy)] |
| 14 | +pub struct Foo_Bar { |
| 15 | + pub abc: ::std::os::raw::c_int, |
| 16 | +} |
| 17 | +#[test] |
| 18 | +fn bindgen_test_layout_Foo_Bar() { |
| 19 | + assert_eq!(::std::mem::size_of::<Foo_Bar>() , 4usize , concat ! ( |
| 20 | + "Size of: " , stringify ! ( Foo_Bar ) )); |
| 21 | + assert_eq! (::std::mem::align_of::<Foo_Bar>() , 4usize , concat ! ( |
| 22 | + "Alignment of " , stringify ! ( Foo_Bar ) )); |
| 23 | + assert_eq! (unsafe { |
| 24 | + & ( * ( 0 as * const Foo_Bar ) ) . abc as * const _ as usize } |
| 25 | + , 0usize , concat ! ( |
| 26 | + "Alignment of field: " , stringify ! ( Foo_Bar ) , "::" , |
| 27 | + stringify ! ( abc ) )); |
| 28 | +} |
| 29 | +impl Clone for Foo_Bar { |
| 30 | + fn clone(&self) -> Self { *self } |
| 31 | +} |
| 32 | +#[test] |
| 33 | +fn bindgen_test_layout_Foo() { |
| 34 | + assert_eq!(::std::mem::size_of::<Foo>() , 4usize , concat ! ( |
| 35 | + "Size of: " , stringify ! ( Foo ) )); |
| 36 | + assert_eq! (::std::mem::align_of::<Foo>() , 4usize , concat ! ( |
| 37 | + "Alignment of " , stringify ! ( Foo ) )); |
| 38 | + assert_eq! (unsafe { |
| 39 | + & ( * ( 0 as * const Foo ) ) . bar as * const _ as usize } , |
| 40 | + 0usize , concat ! ( |
| 41 | + "Alignment of field: " , stringify ! ( Foo ) , "::" , |
| 42 | + stringify ! ( bar ) )); |
| 43 | +} |
| 44 | +impl Clone for Foo { |
| 45 | + fn clone(&self) -> Self { *self } |
| 46 | +} |
| 47 | +#[repr(C)] |
| 48 | +#[derive(Debug, Default, Copy)] |
| 49 | +pub struct Baz { |
| 50 | + pub _address: u8, |
| 51 | +} |
| 52 | +#[repr(C)] |
| 53 | +#[derive(Debug, Default, Copy)] |
| 54 | +pub struct Baz_Bar { |
| 55 | + pub abc: ::std::os::raw::c_int, |
| 56 | +} |
| 57 | +#[test] |
| 58 | +fn bindgen_test_layout_Baz_Bar() { |
| 59 | + assert_eq!(::std::mem::size_of::<Baz_Bar>() , 4usize , concat ! ( |
| 60 | + "Size of: " , stringify ! ( Baz_Bar ) )); |
| 61 | + assert_eq! (::std::mem::align_of::<Baz_Bar>() , 4usize , concat ! ( |
| 62 | + "Alignment of " , stringify ! ( Baz_Bar ) )); |
| 63 | + assert_eq! (unsafe { |
| 64 | + & ( * ( 0 as * const Baz_Bar ) ) . abc as * const _ as usize } |
| 65 | + , 0usize , concat ! ( |
| 66 | + "Alignment of field: " , stringify ! ( Baz_Bar ) , "::" , |
| 67 | + stringify ! ( abc ) )); |
| 68 | +} |
| 69 | +impl Clone for Baz_Bar { |
| 70 | + fn clone(&self) -> Self { *self } |
| 71 | +} |
| 72 | +#[test] |
| 73 | +fn bindgen_test_layout_Baz() { |
| 74 | + assert_eq!(::std::mem::size_of::<Baz>() , 1usize , concat ! ( |
| 75 | + "Size of: " , stringify ! ( Baz ) )); |
| 76 | + assert_eq! (::std::mem::align_of::<Baz>() , 1usize , concat ! ( |
| 77 | + "Alignment of " , stringify ! ( Baz ) )); |
| 78 | +} |
| 79 | +impl Clone for Baz { |
| 80 | + fn clone(&self) -> Self { *self } |
| 81 | +} |
0 commit comments