diff options
author | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-04-16 03:45:45 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-04-16 03:45:45 +0200 |
commit | 1f20b8876f5091dbdde725d8d4a97de3a02797b4 (patch) | |
tree | 77db301855a6283847f0dcf77fc30daad3690783 /tests/expectations/struct_with_anon_struct_array.rs | |
parent | 5e792cd2e0aacb80d7169b6e04ab8036b964ec7b (diff) |
tests: Add expectations
Diffstat (limited to 'tests/expectations/struct_with_anon_struct_array.rs')
-rw-r--r-- | tests/expectations/struct_with_anon_struct_array.rs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/expectations/struct_with_anon_struct_array.rs b/tests/expectations/struct_with_anon_struct_array.rs new file mode 100644 index 00000000..a7912d02 --- /dev/null +++ b/tests/expectations/struct_with_anon_struct_array.rs @@ -0,0 +1,52 @@ +/* automatically generated by rust-bindgen */ + +#![feature(const_fn)] + +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Struct_foo { + pub bar: [Struct_foo_struct_with_anon_struct_array_h_unnamed_1; 2usize], + pub baz: [[[Struct_foo_struct_with_anon_struct_array_h_unnamed_2; 4usize]; 3usize]; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Struct_foo_struct_with_anon_struct_array_h_unnamed_1 { + pub a: ::std::os::raw::c_int, + pub b: ::std::os::raw::c_int, +} +impl ::std::clone::Clone for + Struct_foo_struct_with_anon_struct_array_h_unnamed_1 { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_Struct_foo_struct_with_anon_struct_array_h_unnamed_1() { + assert_eq!(::std::mem::size_of::<Struct_foo_struct_with_anon_struct_array_h_unnamed_1>() + , 8usize); + assert_eq!(::std::mem::align_of::<Struct_foo_struct_with_anon_struct_array_h_unnamed_1>() + , 4usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Struct_foo_struct_with_anon_struct_array_h_unnamed_2 { + pub a: ::std::os::raw::c_int, + pub b: ::std::os::raw::c_int, +} +impl ::std::clone::Clone for + Struct_foo_struct_with_anon_struct_array_h_unnamed_2 { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_Struct_foo_struct_with_anon_struct_array_h_unnamed_2() { + assert_eq!(::std::mem::size_of::<Struct_foo_struct_with_anon_struct_array_h_unnamed_2>() + , 8usize); + assert_eq!(::std::mem::align_of::<Struct_foo_struct_with_anon_struct_array_h_unnamed_2>() + , 4usize); +} +impl ::std::clone::Clone for Struct_foo { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_Struct_foo() { + assert_eq!(::std::mem::size_of::<Struct_foo>() , 208usize); + assert_eq!(::std::mem::align_of::<Struct_foo>() , 4usize); +} |