summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-02-07 16:51:51 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-02-07 16:53:23 +0100
commit193a103bf5333082bba69b7f541b51ba1f723443 (patch)
tree0add85279519b83be96b123cbecc466fce108882
parent1c6985175d14dd3a596ac079340dbb19ff56f9bd (diff)
codegen: Improve the assertion message of the failing layout tests.
-rw-r--r--src/codegen/mod.rs28
-rw-r--r--tests/expectations/tests/16-byte-alignment.rs103
-rw-r--r--tests/expectations/tests/accessors.rs95
-rw-r--r--tests/expectations/tests/annotation_hide.rs16
-rw-r--r--tests/expectations/tests/anon_enum.rs14
-rw-r--r--tests/expectations/tests/anon_enum_trait.rs6
-rw-r--r--tests/expectations/tests/anon_union.rs14
-rw-r--r--tests/expectations/tests/auto.rs6
-rw-r--r--tests/expectations/tests/base-to-derived.rs6
-rw-r--r--tests/expectations/tests/bitfield-enum-basic.rs6
-rw-r--r--tests/expectations/tests/bitfield_method_mangling.rs6
-rw-r--r--tests/expectations/tests/canonical_path_without_namespacing.rs6
-rw-r--r--tests/expectations/tests/class.rs105
-rw-r--r--tests/expectations/tests/class_nested.rs30
-rw-r--r--tests/expectations/tests/class_no_members.rs27
-rw-r--r--tests/expectations/tests/class_static.rs6
-rw-r--r--tests/expectations/tests/class_static_const.rs6
-rw-r--r--tests/expectations/tests/class_use_as.rs20
-rw-r--r--tests/expectations/tests/class_with_dtor.rs18
-rw-r--r--tests/expectations/tests/class_with_inner_struct.rs152
-rw-r--r--tests/expectations/tests/class_with_typedef.rs36
-rw-r--r--tests/expectations/tests/complex.rs40
-rw-r--r--tests/expectations/tests/const_bool.rs6
-rw-r--r--tests/expectations/tests/const_enum_unnamed.rs6
-rw-r--r--tests/expectations/tests/constify-all-enums.rs10
-rw-r--r--tests/expectations/tests/constructor-tp.rs6
-rw-r--r--tests/expectations/tests/constructors.rs12
-rw-r--r--tests/expectations/tests/convert-floats.rs30
-rw-r--r--tests/expectations/tests/crtp.rs31
-rw-r--r--tests/expectations/tests/duplicated-namespaces-definitions.rs24
-rw-r--r--tests/expectations/tests/enum_and_vtable_mangling.rs10
-rw-r--r--tests/expectations/tests/forward-declaration-autoptr.rs10
-rw-r--r--tests/expectations/tests/forward_declared_complex_types.rs16
-rw-r--r--tests/expectations/tests/forward_declared_struct.rs20
-rw-r--r--tests/expectations/tests/func_ptr_in_struct.rs10
-rw-r--r--tests/expectations/tests/inherit_typedef.rs12
-rw-r--r--tests/expectations/tests/inline_namespace.rs10
-rw-r--r--tests/expectations/tests/inline_namespace_conservative.rs10
-rw-r--r--tests/expectations/tests/inner_const.rs10
-rw-r--r--tests/expectations/tests/inner_template_self.rs10
-rw-r--r--tests/expectations/tests/issue-372.rs38
-rw-r--r--tests/expectations/tests/issue-410.rs6
-rw-r--r--tests/expectations/tests/issue-447.rs16
-rw-r--r--tests/expectations/tests/issue_311.rs14
-rw-r--r--tests/expectations/tests/jsval_layout_opaque.rs92
-rw-r--r--tests/expectations/tests/layout.rs3
-rw-r--r--tests/expectations/tests/layout_align.rs16
-rw-r--r--tests/expectations/tests/layout_arp.rs62
-rw-r--r--tests/expectations/tests/layout_array.rs86
-rw-r--r--tests/expectations/tests/layout_cmdline_token.rs69
-rw-r--r--tests/expectations/tests/layout_eth_conf.rs504
-rw-r--r--tests/expectations/tests/layout_kni_mbuf.rs59
-rw-r--r--tests/expectations/tests/layout_mbuf.rs257
-rw-r--r--tests/expectations/tests/method-mangling.rs6
-rw-r--r--tests/expectations/tests/module-whitelisted.rs6
-rw-r--r--tests/expectations/tests/msvc-no-usr.rs10
-rw-r--r--tests/expectations/tests/multiple-inherit-empty-correct-layout.rs18
-rw-r--r--tests/expectations/tests/mutable.rs37
-rw-r--r--tests/expectations/tests/namespace.rs10
-rw-r--r--tests/expectations/tests/nested.rs37
-rw-r--r--tests/expectations/tests/nested_vtable.rs18
-rw-r--r--tests/expectations/tests/nested_within_namespace.rs30
-rw-r--r--tests/expectations/tests/no-comments.rs10
-rw-r--r--tests/expectations/tests/no-derive-debug.rs14
-rw-r--r--tests/expectations/tests/no-recursive-whitelisting.rs10
-rw-r--r--tests/expectations/tests/no-std.rs18
-rw-r--r--tests/expectations/tests/objc_interface_type.rs10
-rw-r--r--tests/expectations/tests/only_bitfields.rs6
-rw-r--r--tests/expectations/tests/opaque-tracing.rs6
-rw-r--r--tests/expectations/tests/opaque_in_struct.rs16
-rw-r--r--tests/expectations/tests/opaque_pointer.rs24
-rw-r--r--tests/expectations/tests/private.rs42
-rw-r--r--tests/expectations/tests/public-dtor.rs6
-rw-r--r--tests/expectations/tests/ref_argument_array.rs6
-rw-r--r--tests/expectations/tests/reparented_replacement.rs10
-rw-r--r--tests/expectations/tests/replace_use.rs10
-rw-r--r--tests/expectations/tests/same_struct_name_in_different_namespaces.rs14
-rw-r--r--tests/expectations/tests/size_t_template.rs10
-rw-r--r--tests/expectations/tests/struct_containing_forward_declared_struct.rs20
-rw-r--r--tests/expectations/tests/struct_with_anon_struct.rs24
-rw-r--r--tests/expectations/tests/struct_with_anon_struct_array.rs42
-rw-r--r--tests/expectations/tests/struct_with_anon_struct_pointer.rs24
-rw-r--r--tests/expectations/tests/struct_with_anon_union.rs24
-rw-r--r--tests/expectations/tests/struct_with_anon_unnamed_struct.rs20
-rw-r--r--tests/expectations/tests/struct_with_anon_unnamed_union.rs20
-rw-r--r--tests/expectations/tests/struct_with_bitfields.rs10
-rw-r--r--tests/expectations/tests/struct_with_derive_debug.rs40
-rw-r--r--tests/expectations/tests/struct_with_nesting.rs66
-rw-r--r--tests/expectations/tests/struct_with_packing.rs14
-rw-r--r--tests/expectations/tests/struct_with_struct.rs24
-rw-r--r--tests/expectations/tests/template.rs52
-rw-r--r--tests/expectations/tests/type-referenced-by-whitelisted-function.rs10
-rw-r--r--tests/expectations/tests/type_alias_template_specialized.rs10
-rw-r--r--tests/expectations/tests/typeref.rs38
-rw-r--r--tests/expectations/tests/union-in-ns.rs10
-rw-r--r--tests/expectations/tests/union_dtor.rs14
-rw-r--r--tests/expectations/tests/union_fields.rs18
-rw-r--r--tests/expectations/tests/union_with_anon_struct.rs24
-rw-r--r--tests/expectations/tests/union_with_anon_struct_bitfield.rs16
-rw-r--r--tests/expectations/tests/union_with_anon_union.rs24
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_struct.rs33
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_union.rs24
-rw-r--r--tests/expectations/tests/union_with_big_member.rs42
-rw-r--r--tests/expectations/tests/union_with_nesting.rs52
-rw-r--r--tests/expectations/tests/unknown_attr.rs13
-rw-r--r--tests/expectations/tests/use-core.rs18
-rw-r--r--tests/expectations/tests/var-tracing.rs16
-rw-r--r--tests/expectations/tests/variadic-method.rs6
-rw-r--r--tests/expectations/tests/vector.rs10
-rw-r--r--tests/expectations/tests/virtual_dtor.rs6
-rw-r--r--tests/expectations/tests/virtual_inheritance.rs36
-rw-r--r--tests/expectations/tests/virtual_overloaded.rs6
-rw-r--r--tests/expectations/tests/vtable_recursive_sig.rs12
-rw-r--r--tests/expectations/tests/weird_bitfields.rs54
-rw-r--r--tests/expectations/tests/what_is_going_on.rs6
-rw-r--r--tests/expectations/tests/whitelist-namespaces-basic.rs6
-rw-r--r--tests/expectations/tests/whitelist-namespaces.rs16
117 files changed, 2523 insertions, 972 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index f19331f4..0fdfaad0 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -866,8 +866,10 @@ impl CodeGenerator for CompInfo {
let item = quote_item!(ctx.ext_cx(),
#[test]
fn $fn_name() {
- assert_eq!($size_of_expr, $size);
- assert_eq!($align_of_expr, $align);
+ assert_eq!($size_of_expr, $size,
+ concat!("Size of template specialization: ", stringify!($ident)));
+ assert_eq!($align_of_expr, $align,
+ concat!("Alignment of template specialization: ", stringify!($ident)));
})
.unwrap();
result.push(item);
@@ -1339,12 +1341,12 @@ impl CodeGenerator for CompInfo {
if let Some(layout) = layout {
let fn_name = format!("bindgen_test_layout_{}", canonical_name);
let fn_name = ctx.rust_ident_raw(&fn_name);
- let ident = ctx.rust_ident_raw(&canonical_name);
+ let type_name = ctx.rust_ident_raw(&canonical_name);
let prefix = ctx.trait_prefix();
let size_of_expr = quote_expr!(ctx.ext_cx(),
- ::$prefix::mem::size_of::<$ident>());
+ ::$prefix::mem::size_of::<$type_name>());
let align_of_expr = quote_expr!(ctx.ext_cx(),
- ::$prefix::mem::align_of::<$ident>());
+ ::$prefix::mem::align_of::<$type_name>());
let size = layout.size;
let align = layout.align;
@@ -1353,7 +1355,9 @@ impl CodeGenerator for CompInfo {
None
} else {
quote_item!(ctx.ext_cx(),
- assert_eq!($align_of_expr, $align);
+ assert_eq!($align_of_expr,
+ $align,
+ concat!("Alignment of ", stringify!($type_name)));
)
};
@@ -1370,8 +1374,6 @@ impl CodeGenerator for CompInfo {
let check_field_offset = if should_skip_field_offset_checks {
None
} else {
- let type_name = ctx.rust_ident(&canonical_name);
-
let asserts = self.fields()
.iter()
.filter(|field| field.bitfield().is_none())
@@ -1382,7 +1384,9 @@ impl CodeGenerator for CompInfo {
let field_name = ctx.rust_ident(name);
quote_item!(ctx.ext_cx(),
- assert_eq!(unsafe { &(*(0 as *const $type_name)).$field_name as *const _ as usize }, $field_offset);
+ assert_eq!(unsafe { &(*(0 as *const $type_name)).$field_name as *const _ as usize },
+ $field_offset,
+ concat!("Alignment of field: ", stringify!($type_name), "::", stringify!($field_name)));
)
})
})
@@ -1394,7 +1398,9 @@ impl CodeGenerator for CompInfo {
let item = quote_item!(ctx.ext_cx(),
#[test]
fn $fn_name() {
- assert_eq!($size_of_expr, $size);
+ assert_eq!($size_of_expr,
+ $size,
+ concat!("Size of: ", stringify!($type_name)));
$check_struct_align
$check_field_offset
@@ -2137,7 +2143,7 @@ impl ToRustTy for Type {
.map(|arg| arg.to_rust_ty(ctx))
.collect::<Vec<_>>();
- path.segments.last_mut().unwrap().parameters = if
+ path.segments.last_mut().unwrap().parameters = if
template_args.is_empty() {
None
} else {
diff --git a/tests/expectations/tests/16-byte-alignment.rs b/tests/expectations/tests/16-byte-alignment.rs
index 9894a37a..b9dd74e3 100644
--- a/tests/expectations/tests/16-byte-alignment.rs
+++ b/tests/expectations/tests/16-byte-alignment.rs
@@ -51,44 +51,66 @@ pub struct rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 2usize);
+ , 2usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 )
- ) . dport as * const _ as usize } , 0usize);
+ ) . dport as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
+ stringify ! ( dport ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 )
- ) . sport as * const _ as usize } , 2usize);
+ ) . sport as * const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
+ stringify ! ( sport ) ));
}
impl Clone for rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1>() ,
- 4usize);
+ assert_eq!(::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1>() , 4usize
+ , concat ! (
+ "Size of: " , stringify ! ( rte_ipv4_tuple__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_ipv4_tuple__bindgen_ty_1>() ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_ipv4_tuple__bindgen_ty_1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_ipv4_tuple__bindgen_ty_1 ) ) .
- sctp_tag as * const _ as usize } , 0usize);
+ sctp_tag as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_ipv4_tuple__bindgen_ty_1 ) , "::" , stringify ! ( sctp_tag
+ ) ));
}
impl Clone for rte_ipv4_tuple__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_ipv4_tuple() {
- assert_eq!(::std::mem::size_of::<rte_ipv4_tuple>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_ipv4_tuple>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_ipv4_tuple>() , 12usize , concat ! (
+ "Size of: " , stringify ! ( rte_ipv4_tuple ) ));
+ assert_eq! (::std::mem::align_of::<rte_ipv4_tuple>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_ipv4_tuple ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_ipv4_tuple ) ) . src_addr as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_ipv4_tuple ) , "::"
+ , stringify ! ( src_addr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_ipv4_tuple ) ) . dst_addr as * const
- _ as usize } , 4usize);
+ _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_ipv4_tuple ) , "::"
+ , stringify ! ( dst_addr ) ));
}
impl Clone for rte_ipv4_tuple {
fn clone(&self) -> Self { *self }
@@ -116,44 +138,66 @@ pub struct rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1>()
- , 2usize);
+ , 2usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 )
- ) . dport as * const _ as usize } , 0usize);
+ ) . dport as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
+ stringify ! ( dport ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 )
- ) . sport as * const _ as usize } , 2usize);
+ ) . sport as * const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
+ stringify ! ( sport ) ));
}
impl Clone for rte_ipv6_tuple__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_ipv6_tuple__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1>() ,
- 4usize);
+ assert_eq!(::std::mem::size_of::<rte_ipv6_tuple__bindgen_ty_1>() , 4usize
+ , concat ! (
+ "Size of: " , stringify ! ( rte_ipv6_tuple__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_ipv6_tuple__bindgen_ty_1>() ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_ipv6_tuple__bindgen_ty_1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_ipv6_tuple__bindgen_ty_1 ) ) .
- sctp_tag as * const _ as usize } , 0usize);
+ sctp_tag as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_ipv6_tuple__bindgen_ty_1 ) , "::" , stringify ! ( sctp_tag
+ ) ));
}
impl Clone for rte_ipv6_tuple__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_ipv6_tuple() {
- assert_eq!(::std::mem::size_of::<rte_ipv6_tuple>() , 36usize);
- assert_eq! (::std::mem::align_of::<rte_ipv6_tuple>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_ipv6_tuple>() , 36usize , concat ! (
+ "Size of: " , stringify ! ( rte_ipv6_tuple ) ));
+ assert_eq! (::std::mem::align_of::<rte_ipv6_tuple>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_ipv6_tuple ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_ipv6_tuple ) ) . src_addr as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_ipv6_tuple ) , "::"
+ , stringify ! ( src_addr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_ipv6_tuple ) ) . dst_addr as * const
- _ as usize } , 16usize);
+ _ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_ipv6_tuple ) , "::"
+ , stringify ! ( dst_addr ) ));
}
impl Clone for rte_ipv6_tuple {
fn clone(&self) -> Self { *self }
@@ -167,13 +211,18 @@ pub struct rte_thash_tuple {
}
#[test]
fn bindgen_test_layout_rte_thash_tuple() {
- assert_eq!(::std::mem::size_of::<rte_thash_tuple>() , 48usize);
+ assert_eq!(::std::mem::size_of::<rte_thash_tuple>() , 48usize , concat ! (
+ "Size of: " , stringify ! ( rte_thash_tuple ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_thash_tuple ) ) . v4 as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_thash_tuple ) ,
+ "::" , stringify ! ( v4 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_thash_tuple ) ) . v6 as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_thash_tuple ) ,
+ "::" , stringify ! ( v6 ) ));
}
impl Clone for rte_thash_tuple {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/accessors.rs b/tests/expectations/tests/accessors.rs
index 435b8119..c0d95bfb 100644
--- a/tests/expectations/tests/accessors.rs
+++ b/tests/expectations/tests/accessors.rs
@@ -17,20 +17,30 @@ pub struct SomeAccessors {
}
#[test]
fn bindgen_test_layout_SomeAccessors() {
- assert_eq!(::std::mem::size_of::<SomeAccessors>() , 16usize);
- assert_eq! (::std::mem::align_of::<SomeAccessors>() , 4usize);
+ assert_eq!(::std::mem::size_of::<SomeAccessors>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( SomeAccessors ) ));
+ assert_eq! (::std::mem::align_of::<SomeAccessors>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( SomeAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const SomeAccessors ) ) . mNoAccessor as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( SomeAccessors ) , "::"
+ , stringify ! ( mNoAccessor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const SomeAccessors ) ) . mBothAccessors as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( SomeAccessors ) , "::"
+ , stringify ! ( mBothAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const SomeAccessors ) ) . mUnsafeAccessors as *
- const _ as usize } , 8usize);
+ const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( SomeAccessors ) , "::"
+ , stringify ! ( mUnsafeAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const SomeAccessors ) ) . mImmutableAccessor as
- * const _ as usize } , 12usize);
+ * const _ as usize } , 12usize , concat ! (
+ "Alignment of field: " , stringify ! ( SomeAccessors ) , "::"
+ , stringify ! ( mImmutableAccessor ) ));
}
impl Clone for SomeAccessors {
fn clone(&self) -> Self { *self }
@@ -67,14 +77,20 @@ pub struct AllAccessors {
}
#[test]
fn bindgen_test_layout_AllAccessors() {
- assert_eq!(::std::mem::size_of::<AllAccessors>() , 8usize);
- assert_eq! (::std::mem::align_of::<AllAccessors>() , 4usize);
+ assert_eq!(::std::mem::size_of::<AllAccessors>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( AllAccessors ) ));
+ assert_eq! (::std::mem::align_of::<AllAccessors>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( AllAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const AllAccessors ) ) . mBothAccessors as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( AllAccessors ) , "::" ,
+ stringify ! ( mBothAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const AllAccessors ) ) . mAlsoBothAccessors as
- * const _ as usize } , 4usize);
+ * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( AllAccessors ) , "::" ,
+ stringify ! ( mAlsoBothAccessors ) ));
}
impl Clone for AllAccessors {
fn clone(&self) -> Self { *self }
@@ -107,14 +123,21 @@ pub struct AllUnsafeAccessors {
}
#[test]
fn bindgen_test_layout_AllUnsafeAccessors() {
- assert_eq!(::std::mem::size_of::<AllUnsafeAccessors>() , 8usize);
- assert_eq! (::std::mem::align_of::<AllUnsafeAccessors>() , 4usize);
+ assert_eq!(::std::mem::size_of::<AllUnsafeAccessors>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( AllUnsafeAccessors ) ));
+ assert_eq! (::std::mem::align_of::<AllUnsafeAccessors>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( AllUnsafeAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const AllUnsafeAccessors ) ) . mBothAccessors
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( AllUnsafeAccessors ) ,
+ "::" , stringify ! ( mBothAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const AllUnsafeAccessors ) ) .
- mAlsoBothAccessors as * const _ as usize } , 4usize);
+ mAlsoBothAccessors as * const _ as usize } , 4usize , concat !
+ (
+ "Alignment of field: " , stringify ! ( AllUnsafeAccessors ) ,
+ "::" , stringify ! ( mAlsoBothAccessors ) ));
}
impl Clone for AllUnsafeAccessors {
fn clone(&self) -> Self { *self }
@@ -153,20 +176,32 @@ pub struct ContradictAccessors {
}
#[test]
fn bindgen_test_layout_ContradictAccessors() {
- assert_eq!(::std::mem::size_of::<ContradictAccessors>() , 16usize);
- assert_eq! (::std::mem::align_of::<ContradictAccessors>() , 4usize);
+ assert_eq!(::std::mem::size_of::<ContradictAccessors>() , 16usize , concat
+ ! ( "Size of: " , stringify ! ( ContradictAccessors ) ));
+ assert_eq! (::std::mem::align_of::<ContradictAccessors>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( ContradictAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ContradictAccessors ) ) . mBothAccessors
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( ContradictAccessors ) ,
+ "::" , stringify ! ( mBothAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ContradictAccessors ) ) . mNoAccessors as
- * const _ as usize } , 4usize);
+ * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( ContradictAccessors ) ,
+ "::" , stringify ! ( mNoAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ContradictAccessors ) ) .
- mUnsafeAccessors as * const _ as usize } , 8usize);
+ mUnsafeAccessors as * const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( ContradictAccessors ) ,
+ "::" , stringify ! ( mUnsafeAccessors ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ContradictAccessors ) ) .
- mImmutableAccessor as * const _ as usize } , 12usize);
+ mImmutableAccessor as * const _ as usize } , 12usize , concat
+ ! (
+ "Alignment of field: " , stringify ! ( ContradictAccessors ) ,
+ "::" , stringify ! ( mImmutableAccessor ) ));
}
impl Clone for ContradictAccessors {
fn clone(&self) -> Self { *self }
@@ -202,11 +237,15 @@ pub struct Replaced {
}
#[test]
fn bindgen_test_layout_Replaced() {
- assert_eq!(::std::mem::size_of::<Replaced>() , 4usize);
- assert_eq! (::std::mem::align_of::<Replaced>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Replaced>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Replaced ) ));
+ assert_eq! (::std::mem::align_of::<Replaced>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Replaced ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Replaced ) ) . mAccessor as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Replaced ) , "::" ,
+ stringify ! ( mAccessor ) ));
}
impl Clone for Replaced {
fn clone(&self) -> Self { *self }
@@ -227,11 +266,15 @@ pub struct Wrapper {
}
#[test]
fn bindgen_test_layout_Wrapper() {
- assert_eq!(::std::mem::size_of::<Wrapper>() , 4usize);
- assert_eq! (::std::mem::align_of::<Wrapper>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Wrapper>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Wrapper ) ));
+ assert_eq! (::std::mem::align_of::<Wrapper>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Wrapper ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Wrapper ) ) . mReplaced as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Wrapper ) , "::" ,
+ stringify ! ( mReplaced ) ));
}
impl Clone for Wrapper {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/annotation_hide.rs b/tests/expectations/tests/annotation_hide.rs
index 31097b6f..62840b13 100644
--- a/tests/expectations/tests/annotation_hide.rs
+++ b/tests/expectations/tests/annotation_hide.rs
@@ -14,8 +14,10 @@ pub struct D {
}
#[test]
fn bindgen_test_layout_D() {
- assert_eq!(::std::mem::size_of::<D>() , 4usize);
- assert_eq! (::std::mem::align_of::<D>() , 4usize);
+ assert_eq!(::std::mem::size_of::<D>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( D ) ));
+ assert_eq! (::std::mem::align_of::<D>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( D ) ));
}
impl Clone for D {
fn clone(&self) -> Self { *self }
@@ -27,11 +29,15 @@ pub struct NotAnnotated {
}
#[test]
fn bindgen_test_layout_NotAnnotated() {
- assert_eq!(::std::mem::size_of::<NotAnnotated>() , 4usize);
- assert_eq! (::std::mem::align_of::<NotAnnotated>() , 4usize);
+ assert_eq!(::std::mem::size_of::<NotAnnotated>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( NotAnnotated ) ));
+ assert_eq! (::std::mem::align_of::<NotAnnotated>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( NotAnnotated ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const NotAnnotated ) ) . f as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( NotAnnotated ) , "::" ,
+ stringify ! ( f ) ));
}
impl Clone for NotAnnotated {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/anon_enum.rs b/tests/expectations/tests/anon_enum.rs
index 7130ac0c..b2c7f5fc 100644
--- a/tests/expectations/tests/anon_enum.rs
+++ b/tests/expectations/tests/anon_enum.rs
@@ -16,14 +16,20 @@ pub const Test_T_NONE: Test__bindgen_ty_1 = Test__bindgen_ty_1::T_NONE;
pub enum Test__bindgen_ty_1 { T_NONE = 0, }
#[test]
fn bindgen_test_layout_Test() {
- assert_eq!(::std::mem::size_of::<Test>() , 8usize);
- assert_eq! (::std::mem::align_of::<Test>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Test>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Test ) ));
+ assert_eq! (::std::mem::align_of::<Test>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Test ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Test ) ) . foo as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Test ) , "::" ,
+ stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Test ) ) . bar as * const _ as usize } ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( Test ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for Test {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/anon_enum_trait.rs b/tests/expectations/tests/anon_enum_trait.rs
index 264b4c46..c258f7d6 100644
--- a/tests/expectations/tests/anon_enum_trait.rs
+++ b/tests/expectations/tests/anon_enum_trait.rs
@@ -39,8 +39,10 @@ pub const Foo_Baz: Foo__bindgen_ty_1 = Foo__bindgen_ty_1::Bar;
pub enum Foo__bindgen_ty_1 { Bar = 0, }
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/anon_union.rs b/tests/expectations/tests/anon_union.rs
index 758150e4..6ded1e57 100644
--- a/tests/expectations/tests/anon_union.rs
+++ b/tests/expectations/tests/anon_union.rs
@@ -69,8 +69,10 @@ pub struct ErrorResult {
}
#[test]
fn bindgen_test_layout_ErrorResult() {
- assert_eq!(::std::mem::size_of::<ErrorResult>() , 24usize);
- assert_eq! (::std::mem::align_of::<ErrorResult>() , 8usize);
+ assert_eq!(::std::mem::size_of::<ErrorResult>() , 24usize , concat ! (
+ "Size of: " , stringify ! ( ErrorResult ) ));
+ assert_eq! (::std::mem::align_of::<ErrorResult>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( ErrorResult ) ));
}
impl Clone for ErrorResult {
fn clone(&self) -> Self { *self }
@@ -78,7 +80,11 @@ impl Clone for ErrorResult {
#[test]
fn __bindgen_test_layout_template_1() {
assert_eq!(::std::mem::size_of::<TErrorResult<::std::os::raw::c_int>>() ,
- 24usize);
+ 24usize , concat ! (
+ "Size of template specialization: " , stringify ! (
+ TErrorResult<::std::os::raw::c_int> ) ));
assert_eq!(::std::mem::align_of::<TErrorResult<::std::os::raw::c_int>>() ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of template specialization: " , stringify ! (
+ TErrorResult<::std::os::raw::c_int> ) ));
}
diff --git a/tests/expectations/tests/auto.rs b/tests/expectations/tests/auto.rs
index d7f96e77..554546af 100644
--- a/tests/expectations/tests/auto.rs
+++ b/tests/expectations/tests/auto.rs
@@ -12,8 +12,10 @@ pub struct Foo {
pub const Foo_kFoo: bool = true;
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/base-to-derived.rs b/tests/expectations/tests/base-to-derived.rs
index e8eb3745..4749096b 100644
--- a/tests/expectations/tests/base-to-derived.rs
+++ b/tests/expectations/tests/base-to-derived.rs
@@ -11,8 +11,10 @@ pub struct false_type {
}
#[test]
fn bindgen_test_layout_false_type() {
- assert_eq!(::std::mem::size_of::<false_type>() , 1usize);
- assert_eq! (::std::mem::align_of::<false_type>() , 1usize);
+ assert_eq!(::std::mem::size_of::<false_type>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( false_type ) ));
+ assert_eq! (::std::mem::align_of::<false_type>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( false_type ) ));
}
impl Clone for false_type {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/bitfield-enum-basic.rs b/tests/expectations/tests/bitfield-enum-basic.rs
index 45adee0f..a8d3ecc5 100644
--- a/tests/expectations/tests/bitfield-enum-basic.rs
+++ b/tests/expectations/tests/bitfield-enum-basic.rs
@@ -69,8 +69,10 @@ impl ::std::ops::BitOr<Dummy__bindgen_ty_1> for Dummy__bindgen_ty_1 {
pub struct Dummy__bindgen_ty_1(pub ::std::os::raw::c_uint);
#[test]
fn bindgen_test_layout_Dummy() {
- assert_eq!(::std::mem::size_of::<Dummy>() , 1usize);
- assert_eq! (::std::mem::align_of::<Dummy>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Dummy>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Dummy ) ));
+ assert_eq! (::std::mem::align_of::<Dummy>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Dummy ) ));
}
impl Clone for Dummy {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/bitfield_method_mangling.rs b/tests/expectations/tests/bitfield_method_mangling.rs
index b9165121..94f0aa8e 100644
--- a/tests/expectations/tests/bitfield_method_mangling.rs
+++ b/tests/expectations/tests/bitfield_method_mangling.rs
@@ -11,8 +11,10 @@ pub struct _bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( _bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( _bindgen_ty_1 ) ));
}
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/canonical_path_without_namespacing.rs b/tests/expectations/tests/canonical_path_without_namespacing.rs
index c175c471..dff6b707 100644
--- a/tests/expectations/tests/canonical_path_without_namespacing.rs
+++ b/tests/expectations/tests/canonical_path_without_namespacing.rs
@@ -11,8 +11,10 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 1usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class.rs b/tests/expectations/tests/class.rs
index a1426347..46adbc29 100644
--- a/tests/expectations/tests/class.rs
+++ b/tests/expectations/tests/class.rs
@@ -67,13 +67,19 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 40usize);
- assert_eq! (::std::mem::align_of::<C>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C>() , 40usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe { & ( * ( 0 as * const C ) ) . a as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . big_array as * const _ as usize }
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( big_array ) ));
}
#[repr(C)]
pub struct C_with_zero_length_array {
@@ -83,17 +89,30 @@ pub struct C_with_zero_length_array {
}
#[test]
fn bindgen_test_layout_C_with_zero_length_array() {
- assert_eq!(::std::mem::size_of::<C_with_zero_length_array>() , 40usize);
- assert_eq! (::std::mem::align_of::<C_with_zero_length_array>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C_with_zero_length_array>() , 40usize ,
+ concat ! (
+ "Size of: " , stringify ! ( C_with_zero_length_array ) ));
+ assert_eq! (::std::mem::align_of::<C_with_zero_length_array>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( C_with_zero_length_array ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C_with_zero_length_array ) ) . a as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C_with_zero_length_array ) , "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C_with_zero_length_array ) ) . big_array
- as * const _ as usize } , 4usize);
+ as * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C_with_zero_length_array ) , "::" , stringify ! ( big_array )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const C_with_zero_length_array ) ) .
- zero_length_array as * const _ as usize } , 37usize);
+ zero_length_array as * const _ as usize } , 37usize , concat !
+ (
+ "Alignment of field: " , stringify ! (
+ C_with_zero_length_array ) , "::" , stringify ! (
+ zero_length_array ) ));
}
#[repr(C)]
pub struct C_with_incomplete_array {
@@ -103,8 +122,12 @@ pub struct C_with_incomplete_array {
}
#[test]
fn bindgen_test_layout_C_with_incomplete_array() {
- assert_eq!(::std::mem::size_of::<C_with_incomplete_array>() , 40usize);
- assert_eq! (::std::mem::align_of::<C_with_incomplete_array>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C_with_incomplete_array>() , 40usize ,
+ concat ! (
+ "Size of: " , stringify ! ( C_with_incomplete_array ) ));
+ assert_eq! (::std::mem::align_of::<C_with_incomplete_array>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( C_with_incomplete_array ) ));
}
#[repr(C)]
pub struct C_with_zero_length_array_and_incomplete_array {
@@ -116,9 +139,13 @@ pub struct C_with_zero_length_array_and_incomplete_array {
#[test]
fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() {
assert_eq!(::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array>()
- , 40usize);
+ , 40usize , concat ! (
+ "Size of: " , stringify ! (
+ C_with_zero_length_array_and_incomplete_array ) ));
assert_eq! (::std::mem::align_of::<C_with_zero_length_array_and_incomplete_array>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ C_with_zero_length_array_and_incomplete_array ) ));
}
#[repr(C)]
#[derive(Debug)]
@@ -127,11 +154,15 @@ pub struct WithDtor {
}
#[test]
fn bindgen_test_layout_WithDtor() {
- assert_eq!(::std::mem::size_of::<WithDtor>() , 4usize);
- assert_eq! (::std::mem::align_of::<WithDtor>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithDtor>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( WithDtor ) ));
+ assert_eq! (::std::mem::align_of::<WithDtor>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( WithDtor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithDtor ) ) . b as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithDtor ) , "::" ,
+ stringify ! ( b ) ));
}
#[repr(C)]
pub struct IncompleteArrayNonCopiable {
@@ -140,9 +171,13 @@ pub struct IncompleteArrayNonCopiable {
}
#[test]
fn bindgen_test_layout_IncompleteArrayNonCopiable() {
- assert_eq!(::std::mem::size_of::<IncompleteArrayNonCopiable>() , 8usize);
- assert_eq! (::std::mem::align_of::<IncompleteArrayNonCopiable>() ,
- 8usize);
+ assert_eq!(::std::mem::size_of::<IncompleteArrayNonCopiable>() , 8usize ,
+ concat ! (
+ "Size of: " , stringify ! ( IncompleteArrayNonCopiable ) ));
+ assert_eq! (::std::mem::align_of::<IncompleteArrayNonCopiable>() , 8usize
+ , concat ! (
+ "Alignment of " , stringify ! ( IncompleteArrayNonCopiable )
+ ));
}
#[repr(C)]
#[derive(Debug, Copy)]
@@ -153,14 +188,20 @@ pub struct Union {
}
#[test]
fn bindgen_test_layout_Union() {
- assert_eq!(::std::mem::size_of::<Union>() , 4usize);
- assert_eq! (::std::mem::align_of::<Union>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Union>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Union ) ));
+ assert_eq! (::std::mem::align_of::<Union>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Union ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Union ) ) . d as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Union ) , "::" ,
+ stringify ! ( d ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Union ) ) . i as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Union ) , "::" ,
+ stringify ! ( i ) ));
}
impl Clone for Union {
fn clone(&self) -> Self { *self }
@@ -172,11 +213,15 @@ pub struct WithUnion {
}
#[test]
fn bindgen_test_layout_WithUnion() {
- assert_eq!(::std::mem::size_of::<WithUnion>() , 4usize);
- assert_eq! (::std::mem::align_of::<WithUnion>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithUnion>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( WithUnion ) ));
+ assert_eq! (::std::mem::align_of::<WithUnion>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( WithUnion ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithUnion ) ) . data as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithUnion ) , "::" ,
+ stringify ! ( data ) ));
}
impl Clone for WithUnion {
fn clone(&self) -> Self { *self }
@@ -189,9 +234,13 @@ pub struct RealAbstractionWithTonsOfMethods {
#[test]
fn bindgen_test_layout_RealAbstractionWithTonsOfMethods() {
assert_eq!(::std::mem::size_of::<RealAbstractionWithTonsOfMethods>() ,
- 1usize);
+ 1usize , concat ! (
+ "Size of: " , stringify ! ( RealAbstractionWithTonsOfMethods )
+ ));
assert_eq! (::std::mem::align_of::<RealAbstractionWithTonsOfMethods>() ,
- 1usize);
+ 1usize , concat ! (
+ "Alignment of " , stringify ! (
+ RealAbstractionWithTonsOfMethods ) ));
}
extern "C" {
#[link_name = "_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
diff --git a/tests/expectations/tests/class_nested.rs b/tests/expectations/tests/class_nested.rs
index 4df28198..8a4125c9 100644
--- a/tests/expectations/tests/class_nested.rs
+++ b/tests/expectations/tests/class_nested.rs
@@ -16,22 +16,30 @@ pub struct A_B {
}
#[test]
fn bindgen_test_layout_A_B() {
- assert_eq!(::std::mem::size_of::<A_B>() , 4usize);
- assert_eq! (::std::mem::align_of::<A_B>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A_B>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( A_B ) ));
+ assert_eq! (::std::mem::align_of::<A_B>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( A_B ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A_B ) ) . member_b as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A_B ) , "::" ,
+ stringify ! ( member_b ) ));
}
impl Clone for A_B {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 4usize);
- assert_eq! (::std::mem::align_of::<A>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A ) ) . member_a as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A ) , "::" , stringify
+ ! ( member_a ) ));
}
impl Clone for A {
fn clone(&self) -> Self { *self }
@@ -47,11 +55,15 @@ pub struct D {
}
#[test]
fn bindgen_test_layout_D() {
- assert_eq!(::std::mem::size_of::<D>() , 4usize);
- assert_eq! (::std::mem::align_of::<D>() , 4usize);
+ assert_eq!(::std::mem::size_of::<D>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( D ) ));
+ assert_eq! (::std::mem::align_of::<D>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( D ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const D ) ) . member as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( D ) , "::" , stringify
+ ! ( member ) ));
}
impl Clone for D {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class_no_members.rs b/tests/expectations/tests/class_no_members.rs
index 1e3ace3b..e41e3ffc 100644
--- a/tests/expectations/tests/class_no_members.rs
+++ b/tests/expectations/tests/class_no_members.rs
@@ -11,8 +11,10 @@ pub struct whatever {
}
#[test]
fn bindgen_test_layout_whatever() {
- assert_eq!(::std::mem::size_of::<whatever>() , 1usize);
- assert_eq! (::std::mem::align_of::<whatever>() , 1usize);
+ assert_eq!(::std::mem::size_of::<whatever>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( whatever ) ));
+ assert_eq! (::std::mem::align_of::<whatever>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( whatever ) ));
}
impl Clone for whatever {
fn clone(&self) -> Self { *self }
@@ -24,8 +26,10 @@ pub struct whatever_child {
}
#[test]
fn bindgen_test_layout_whatever_child() {
- assert_eq!(::std::mem::size_of::<whatever_child>() , 1usize);
- assert_eq! (::std::mem::align_of::<whatever_child>() , 1usize);
+ assert_eq!(::std::mem::size_of::<whatever_child>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( whatever_child ) ));
+ assert_eq! (::std::mem::align_of::<whatever_child>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( whatever_child ) ));
}
impl Clone for whatever_child {
fn clone(&self) -> Self { *self }
@@ -37,12 +41,19 @@ pub struct whatever_child_with_member {
}
#[test]
fn bindgen_test_layout_whatever_child_with_member() {
- assert_eq!(::std::mem::size_of::<whatever_child_with_member>() , 4usize);
- assert_eq! (::std::mem::align_of::<whatever_child_with_member>() ,
- 4usize);
+ assert_eq!(::std::mem::size_of::<whatever_child_with_member>() , 4usize ,
+ concat ! (
+ "Size of: " , stringify ! ( whatever_child_with_member ) ));
+ assert_eq! (::std::mem::align_of::<whatever_child_with_member>() , 4usize
+ , concat ! (
+ "Alignment of " , stringify ! ( whatever_child_with_member )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const whatever_child_with_member ) ) . m_member
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ whatever_child_with_member ) , "::" , stringify ! ( m_member )
+ ));
}
impl Clone for whatever_child_with_member {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class_static.rs b/tests/expectations/tests/class_static.rs
index 7730d279..207295b6 100644
--- a/tests/expectations/tests/class_static.rs
+++ b/tests/expectations/tests/class_static.rs
@@ -20,8 +20,10 @@ extern "C" {
}
#[test]
fn bindgen_test_layout_MyClass() {
- assert_eq!(::std::mem::size_of::<MyClass>() , 1usize);
- assert_eq! (::std::mem::align_of::<MyClass>() , 1usize);
+ assert_eq!(::std::mem::size_of::<MyClass>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( MyClass ) ));
+ assert_eq! (::std::mem::align_of::<MyClass>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( MyClass ) ));
}
impl Clone for MyClass {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class_static_const.rs b/tests/expectations/tests/class_static_const.rs
index 0723325d..5e59485b 100644
--- a/tests/expectations/tests/class_static_const.rs
+++ b/tests/expectations/tests/class_static_const.rs
@@ -14,8 +14,10 @@ pub const A_b: i32 = 63;
pub const A_c: u32 = 255;
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 1usize);
- assert_eq! (::std::mem::align_of::<A>() , 1usize);
+ assert_eq!(::std::mem::size_of::<A>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
}
impl Clone for A {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class_use_as.rs b/tests/expectations/tests/class_use_as.rs
index 68618155..9184c9c8 100644
--- a/tests/expectations/tests/class_use_as.rs
+++ b/tests/expectations/tests/class_use_as.rs
@@ -14,11 +14,15 @@ pub struct whatever {
}
#[test]
fn bindgen_test_layout_whatever() {
- assert_eq!(::std::mem::size_of::<whatever>() , 4usize);
- assert_eq! (::std::mem::align_of::<whatever>() , 4usize);
+ assert_eq!(::std::mem::size_of::<whatever>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( whatever ) ));
+ assert_eq! (::std::mem::align_of::<whatever>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( whatever ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const whatever ) ) . replacement as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( whatever ) , "::" ,
+ stringify ! ( replacement ) ));
}
impl Clone for whatever {
fn clone(&self) -> Self { *self }
@@ -30,11 +34,15 @@ pub struct container {
}
#[test]
fn bindgen_test_layout_container() {
- assert_eq!(::std::mem::size_of::<container>() , 4usize);
- assert_eq! (::std::mem::align_of::<container>() , 4usize);
+ assert_eq!(::std::mem::size_of::<container>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( container ) ));
+ assert_eq! (::std::mem::align_of::<container>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( container ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const container ) ) . c as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( container ) , "::" ,
+ stringify ! ( c ) ));
}
impl Clone for container {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class_with_dtor.rs b/tests/expectations/tests/class_with_dtor.rs
index e3bed7b1..1d8e6b4d 100644
--- a/tests/expectations/tests/class_with_dtor.rs
+++ b/tests/expectations/tests/class_with_dtor.rs
@@ -17,16 +17,24 @@ pub struct WithoutDtor {
}
#[test]
fn bindgen_test_layout_WithoutDtor() {
- assert_eq!(::std::mem::size_of::<WithoutDtor>() , 8usize);
- assert_eq! (::std::mem::align_of::<WithoutDtor>() , 8usize);
+ assert_eq!(::std::mem::size_of::<WithoutDtor>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( WithoutDtor ) ));
+ assert_eq! (::std::mem::align_of::<WithoutDtor>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( WithoutDtor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithoutDtor ) ) . shouldBeWithDtor as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithoutDtor ) , "::" ,
+ stringify ! ( shouldBeWithDtor ) ));
}
#[test]
fn __bindgen_test_layout_template_1() {
assert_eq!(::std::mem::size_of::<HandleWithDtor<::std::os::raw::c_int>>()
- , 8usize);
+ , 8usize , concat ! (
+ "Size of template specialization: " , stringify ! (
+ HandleWithDtor<::std::os::raw::c_int> ) ));
assert_eq!(::std::mem::align_of::<HandleWithDtor<::std::os::raw::c_int>>()
- , 8usize);
+ , 8usize , concat ! (
+ "Alignment of template specialization: " , stringify ! (
+ HandleWithDtor<::std::os::raw::c_int> ) ));
}
diff --git a/tests/expectations/tests/class_with_inner_struct.rs b/tests/expectations/tests/class_with_inner_struct.rs
index 8c800e29..1056fd69 100644
--- a/tests/expectations/tests/class_with_inner_struct.rs
+++ b/tests/expectations/tests/class_with_inner_struct.rs
@@ -43,14 +43,20 @@ pub struct A_Segment {
}
#[test]
fn bindgen_test_layout_A_Segment() {
- assert_eq!(::std::mem::size_of::<A_Segment>() , 8usize);
- assert_eq! (::std::mem::align_of::<A_Segment>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A_Segment>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( A_Segment ) ));
+ assert_eq! (::std::mem::align_of::<A_Segment>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( A_Segment ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A_Segment ) ) . begin as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A_Segment ) , "::" ,
+ stringify ! ( begin ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A_Segment ) ) . end as * const _ as usize
- } , 4usize);
+ } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( A_Segment ) , "::" ,
+ stringify ! ( end ) ));
}
impl Clone for A_Segment {
fn clone(&self) -> Self { *self }
@@ -63,11 +69,15 @@ pub struct A__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_A__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<A__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<A__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A__bindgen_ty_1>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( A__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<A__bindgen_ty_1>() , 4usize , concat !
+ ( "Alignment of " , stringify ! ( A__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A__bindgen_ty_1 ) ) . f as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A__bindgen_ty_1 ) ,
+ "::" , stringify ! ( f ) ));
}
impl Clone for A__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -80,24 +90,34 @@ pub struct A__bindgen_ty_2 {
}
#[test]
fn bindgen_test_layout_A__bindgen_ty_2() {
- assert_eq!(::std::mem::size_of::<A__bindgen_ty_2>() , 4usize);
- assert_eq! (::std::mem::align_of::<A__bindgen_ty_2>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A__bindgen_ty_2>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( A__bindgen_ty_2 ) ));
+ assert_eq! (::std::mem::align_of::<A__bindgen_ty_2>() , 4usize , concat !
+ ( "Alignment of " , stringify ! ( A__bindgen_ty_2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A__bindgen_ty_2 ) ) . d as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A__bindgen_ty_2 ) ,
+ "::" , stringify ! ( d ) ));
}
impl Clone for A__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 12usize);
- assert_eq! (::std::mem::align_of::<A>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A>() , 12usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
assert_eq! (unsafe { & ( * ( 0 as * const A ) ) . c as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A ) , "::" , stringify
+ ! ( c ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A ) ) . named_union as * const _ as usize
- } , 4usize);
+ } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( A ) , "::" , stringify
+ ! ( named_union ) ));
}
impl Clone for A {
fn clone(&self) -> Self { *self }
@@ -115,24 +135,34 @@ pub struct B_Segment {
}
#[test]
fn bindgen_test_layout_B_Segment() {
- assert_eq!(::std::mem::size_of::<B_Segment>() , 8usize);
- assert_eq! (::std::mem::align_of::<B_Segment>() , 4usize);
+ assert_eq!(::std::mem::size_of::<B_Segment>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( B_Segment ) ));
+ assert_eq! (::std::mem::align_of::<B_Segment>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( B_Segment ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const B_Segment ) ) . begin as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( B_Segment ) , "::" ,
+ stringify ! ( begin ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const B_Segment ) ) . end as * const _ as usize
- } , 4usize);
+ } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( B_Segment ) , "::" ,
+ stringify ! ( end ) ));
}
impl Clone for B_Segment {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_B() {
- assert_eq!(::std::mem::size_of::<B>() , 4usize);
- assert_eq! (::std::mem::align_of::<B>() , 4usize);
+ assert_eq!(::std::mem::size_of::<B>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( B ) ));
+ assert_eq! (::std::mem::align_of::<B>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( B ) ));
assert_eq! (unsafe { & ( * ( 0 as * const B ) ) . d as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( B ) , "::" , stringify
+ ! ( d ) ));
}
impl Clone for B {
fn clone(&self) -> Self { *self }
@@ -169,21 +199,36 @@ pub struct C__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<C__bindgen_ty_1__bindgen_ty_1>() ,
- 16usize);
+ 16usize , concat ! (
+ "Size of: " , stringify ! ( C__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<C__bindgen_ty_1__bindgen_ty_1>() ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of " , stringify ! ( C__bindgen_ty_1__bindgen_ty_1
+ ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1__bindgen_ty_1 ) ) . mX1
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( mX1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1__bindgen_ty_1 ) ) . mY1
- as * const _ as usize } , 4usize);
+ as * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( mY1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1__bindgen_ty_1 ) ) . mX2
- as * const _ as usize } , 8usize);
+ as * const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( mX2 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1__bindgen_ty_1 ) ) . mY2
- as * const _ as usize } , 12usize);
+ as * const _ as usize } , 12usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( mY2 )
+ ));
}
impl Clone for C__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -196,27 +241,40 @@ pub struct C__bindgen_ty_1__bindgen_ty_2 {
}
#[test]
fn bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_2() {
- assert_eq!(::std::mem::size_of::<C__bindgen_ty_1__bindgen_ty_2>() ,
- 8usize);
+ assert_eq!(::std::mem::size_of::<C__bindgen_ty_1__bindgen_ty_2>() , 8usize
+ , concat ! (
+ "Size of: " , stringify ! ( C__bindgen_ty_1__bindgen_ty_2 ) ));
assert_eq! (::std::mem::align_of::<C__bindgen_ty_1__bindgen_ty_2>() ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of " , stringify ! ( C__bindgen_ty_1__bindgen_ty_2
+ ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1__bindgen_ty_2 ) ) .
- mStepSyntax as * const _ as usize } , 0usize);
+ mStepSyntax as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! (
+ mStepSyntax ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1__bindgen_ty_2 ) ) .
- mSteps as * const _ as usize } , 4usize);
+ mSteps as * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ C__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( mSteps
+ ) ));
}
impl Clone for C__bindgen_ty_1__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_C__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<C__bindgen_ty_1>() , 16usize);
- assert_eq! (::std::mem::align_of::<C__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C__bindgen_ty_1>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( C__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<C__bindgen_ty_1>() , 4usize , concat !
+ ( "Alignment of " , stringify ! ( C__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C__bindgen_ty_1 ) ) . mFunc as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C__bindgen_ty_1 ) ,
+ "::" , stringify ! ( mFunc ) ));
}
impl Clone for C__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -229,24 +287,34 @@ pub struct C_Segment {
}
#[test]
fn bindgen_test_layout_C_Segment() {
- assert_eq!(::std::mem::size_of::<C_Segment>() , 8usize);
- assert_eq! (::std::mem::align_of::<C_Segment>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C_Segment>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( C_Segment ) ));
+ assert_eq! (::std::mem::align_of::<C_Segment>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( C_Segment ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C_Segment ) ) . begin as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C_Segment ) , "::" ,
+ stringify ! ( begin ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C_Segment ) ) . end as * const _ as usize
- } , 4usize);
+ } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( C_Segment ) , "::" ,
+ stringify ! ( end ) ));
}
impl Clone for C_Segment {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 20usize);
- assert_eq! (::std::mem::align_of::<C>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C>() , 20usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe { & ( * ( 0 as * const C ) ) . d as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( d ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/class_with_typedef.rs b/tests/expectations/tests/class_with_typedef.rs
index 2a7da809..d3141fd9 100644
--- a/tests/expectations/tests/class_with_typedef.rs
+++ b/tests/expectations/tests/class_with_typedef.rs
@@ -18,21 +18,33 @@ pub type C_MyInt = ::std::os::raw::c_int;
pub type C_Lookup = *const ::std::os::raw::c_char;
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 72usize);
- assert_eq! (::std::mem::align_of::<C>() , 8usize);
+ assert_eq!(::std::mem::size_of::<C>() , 72usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe { & ( * ( 0 as * const C ) ) . c as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( c ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . ptr as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( ptr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . arr as * const _ as usize } ,
- 16usize);
+ 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( arr ) ));
assert_eq! (unsafe { & ( * ( 0 as * const C ) ) . d as * const _ as usize
- } , 56usize);
+ } , 56usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( d ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . other_ptr as * const _ as usize }
- , 64usize);
+ , 64usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( other_ptr ) ));
}
extern "C" {
#[link_name = "_ZN1C6methodEi"]
@@ -77,11 +89,15 @@ pub struct D {
}
#[test]
fn bindgen_test_layout_D() {
- assert_eq!(::std::mem::size_of::<D>() , 80usize);
- assert_eq! (::std::mem::align_of::<D>() , 8usize);
+ assert_eq!(::std::mem::size_of::<D>() , 80usize , concat ! (
+ "Size of: " , stringify ! ( D ) ));
+ assert_eq! (::std::mem::align_of::<D>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( D ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const D ) ) . ptr as * const _ as usize } ,
- 72usize);
+ 72usize , concat ! (
+ "Alignment of field: " , stringify ! ( D ) , "::" , stringify
+ ! ( ptr ) ));
}
impl Clone for D {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/complex.rs b/tests/expectations/tests/complex.rs
index 3f85616a..1048138e 100644
--- a/tests/expectations/tests/complex.rs
+++ b/tests/expectations/tests/complex.rs
@@ -17,11 +17,15 @@ pub struct TestDouble {
}
#[test]
fn bindgen_test_layout_TestDouble() {
- assert_eq!(::std::mem::size_of::<TestDouble>() , 16usize);
- assert_eq! (::std::mem::align_of::<TestDouble>() , 8usize);
+ assert_eq!(::std::mem::size_of::<TestDouble>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( TestDouble ) ));
+ assert_eq! (::std::mem::align_of::<TestDouble>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( TestDouble ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const TestDouble ) ) . mMember as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( TestDouble ) , "::" ,
+ stringify ! ( mMember ) ));
}
impl Clone for TestDouble {
fn clone(&self) -> Self { *self }
@@ -33,11 +37,15 @@ pub struct TestDoublePtr {
}
#[test]
fn bindgen_test_layout_TestDoublePtr() {
- assert_eq!(::std::mem::size_of::<TestDoublePtr>() , 8usize);
- assert_eq! (::std::mem::align_of::<TestDoublePtr>() , 8usize);
+ assert_eq!(::std::mem::size_of::<TestDoublePtr>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( TestDoublePtr ) ));
+ assert_eq! (::std::mem::align_of::<TestDoublePtr>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( TestDoublePtr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const TestDoublePtr ) ) . mMember as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( TestDoublePtr ) , "::"
+ , stringify ! ( mMember ) ));
}
impl Clone for TestDoublePtr {
fn clone(&self) -> Self { *self }
@@ -49,11 +57,15 @@ pub struct TestFloat {
}
#[test]
fn bindgen_test_layout_TestFloat() {
- assert_eq!(::std::mem::size_of::<TestFloat>() , 8usize);
- assert_eq! (::std::mem::align_of::<TestFloat>() , 4usize);
+ assert_eq!(::std::mem::size_of::<TestFloat>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( TestFloat ) ));
+ assert_eq! (::std::mem::align_of::<TestFloat>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( TestFloat ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const TestFloat ) ) . mMember as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( TestFloat ) , "::" ,
+ stringify ! ( mMember ) ));
}
impl Clone for TestFloat {
fn clone(&self) -> Self { *self }
@@ -65,11 +77,15 @@ pub struct TestFloatPtr {
}
#[test]
fn bindgen_test_layout_TestFloatPtr() {
- assert_eq!(::std::mem::size_of::<TestFloatPtr>() , 8usize);
- assert_eq! (::std::mem::align_of::<TestFloatPtr>() , 8usize);
+ assert_eq!(::std::mem::size_of::<TestFloatPtr>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( TestFloatPtr ) ));
+ assert_eq! (::std::mem::align_of::<TestFloatPtr>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( TestFloatPtr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const TestFloatPtr ) ) . mMember as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( TestFloatPtr ) , "::" ,
+ stringify ! ( mMember ) ));
}
impl Clone for TestFloatPtr {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/const_bool.rs b/tests/expectations/tests/const_bool.rs
index 8a568113..2c8ba788 100644
--- a/tests/expectations/tests/const_bool.rs
+++ b/tests/expectations/tests/const_bool.rs
@@ -13,8 +13,10 @@ pub struct A {
pub const A_k: bool = false;
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 1usize);
- assert_eq! (::std::mem::align_of::<A>() , 1usize);
+ assert_eq!(::std::mem::size_of::<A>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
}
impl Clone for A {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/const_enum_unnamed.rs b/tests/expectations/tests/const_enum_unnamed.rs
index 9d586dee..8a5f0f23 100644
--- a/tests/expectations/tests/const_enum_unnamed.rs
+++ b/tests/expectations/tests/const_enum_unnamed.rs
@@ -20,8 +20,10 @@ pub const Foo_FOO_BAR: Foo__bindgen_ty_1 = Foo__bindgen_ty_1::FOO_BAR;
pub enum Foo__bindgen_ty_1 { FOO_BAR = 10, }
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/constify-all-enums.rs b/tests/expectations/tests/constify-all-enums.rs
index e5b23a68..ae89a9b7 100644
--- a/tests/expectations/tests/constify-all-enums.rs
+++ b/tests/expectations/tests/constify-all-enums.rs
@@ -15,11 +15,15 @@ pub struct bar {
}
#[test]
fn bindgen_test_layout_bar() {
- assert_eq!(::std::mem::size_of::<bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( bar ) ));
+ assert_eq! (::std::mem::align_of::<bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const bar ) ) . this_should_work as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( bar ) , "::" ,
+ stringify ! ( this_should_work ) ));
}
impl Clone for bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/constructor-tp.rs b/tests/expectations/tests/constructor-tp.rs
index 4e8bcf67..0f53317b 100644
--- a/tests/expectations/tests/constructor-tp.rs
+++ b/tests/expectations/tests/constructor-tp.rs
@@ -17,8 +17,10 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 1usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
}
extern "C" {
#[link_name = "_ZN3BarC1Ev"]
diff --git a/tests/expectations/tests/constructors.rs b/tests/expectations/tests/constructors.rs
index 8bea85c7..3abb2da7 100644
--- a/tests/expectations/tests/constructors.rs
+++ b/tests/expectations/tests/constructors.rs
@@ -11,8 +11,10 @@ pub struct TestOverload {
}
#[test]
fn bindgen_test_layout_TestOverload() {
- assert_eq!(::std::mem::size_of::<TestOverload>() , 1usize);
- assert_eq! (::std::mem::align_of::<TestOverload>() , 1usize);
+ assert_eq!(::std::mem::size_of::<TestOverload>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( TestOverload ) ));
+ assert_eq! (::std::mem::align_of::<TestOverload>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( TestOverload ) ));
}
extern "C" {
#[link_name = "_ZN12TestOverloadC1Ei"]
@@ -47,8 +49,10 @@ pub struct TestPublicNoArgs {
}
#[test]
fn bindgen_test_layout_TestPublicNoArgs() {
- assert_eq!(::std::mem::size_of::<TestPublicNoArgs>() , 1usize);
- assert_eq! (::std::mem::align_of::<TestPublicNoArgs>() , 1usize);
+ assert_eq!(::std::mem::size_of::<TestPublicNoArgs>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( TestPublicNoArgs ) ));
+ assert_eq! (::std::mem::align_of::<TestPublicNoArgs>() , 1usize , concat !
+ ( "Alignment of " , stringify ! ( TestPublicNoArgs ) ));
}
extern "C" {
#[link_name = "_ZN16TestPublicNoArgsC1Ev"]
diff --git a/tests/expectations/tests/convert-floats.rs b/tests/expectations/tests/convert-floats.rs
index 75cbb4b2..5971db06 100644
--- a/tests/expectations/tests/convert-floats.rs
+++ b/tests/expectations/tests/convert-floats.rs
@@ -22,26 +22,40 @@ pub struct foo {
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 48usize);
- assert_eq! (::std::mem::align_of::<foo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 48usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . baz as * const _ as usize } ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( baz ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bazz as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bazz ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bazzz as * const _ as usize } ,
- 16usize);
+ 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bazzz ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . complexFloat as * const _ as
- usize } , 24usize);
+ usize } , 24usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( complexFloat ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . complexDouble as * const _ as
- usize } , 32usize);
+ usize } , 32usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( complexDouble ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/crtp.rs b/tests/expectations/tests/crtp.rs
index 295732d0..8fe0a5ae 100644
--- a/tests/expectations/tests/crtp.rs
+++ b/tests/expectations/tests/crtp.rs
@@ -17,8 +17,10 @@ pub struct Derived {
}
#[test]
fn bindgen_test_layout_Derived() {
- assert_eq!(::std::mem::size_of::<Derived>() , 1usize);
- assert_eq! (::std::mem::align_of::<Derived>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Derived>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Derived ) ));
+ assert_eq! (::std::mem::align_of::<Derived>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Derived ) ));
}
impl Clone for Derived {
fn clone(&self) -> Self { *self }
@@ -36,20 +38,31 @@ pub struct DerivedFromBaseWithDestructor {
}
#[test]
fn bindgen_test_layout_DerivedFromBaseWithDestructor() {
- assert_eq!(::std::mem::size_of::<DerivedFromBaseWithDestructor>() ,
- 1usize);
+ assert_eq!(::std::mem::size_of::<DerivedFromBaseWithDestructor>() , 1usize
+ , concat ! (
+ "Size of: " , stringify ! ( DerivedFromBaseWithDestructor ) ));
assert_eq! (::std::mem::align_of::<DerivedFromBaseWithDestructor>() ,
- 1usize);
+ 1usize , concat ! (
+ "Alignment of " , stringify ! ( DerivedFromBaseWithDestructor
+ ) ));
}
#[test]
fn __bindgen_test_layout_template_1() {
- assert_eq!(::std::mem::size_of::<Base<Derived>>() , 1usize);
- assert_eq!(::std::mem::align_of::<Base<Derived>>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Base<Derived>>() , 1usize , concat ! (
+ "Size of template specialization: " , stringify ! (
+ Base<Derived> ) ));
+ assert_eq!(::std::mem::align_of::<Base<Derived>>() , 1usize , concat ! (
+ "Alignment of template specialization: " , stringify ! (
+ Base<Derived> ) ));
}
#[test]
fn __bindgen_test_layout_template_2() {
assert_eq!(::std::mem::size_of::<BaseWithDestructor<DerivedFromBaseWithDestructor>>()
- , 1usize);
+ , 1usize , concat ! (
+ "Size of template specialization: " , stringify ! (
+ BaseWithDestructor<DerivedFromBaseWithDestructor> ) ));
assert_eq!(::std::mem::align_of::<BaseWithDestructor<DerivedFromBaseWithDestructor>>()
- , 1usize);
+ , 1usize , concat ! (
+ "Alignment of template specialization: " , stringify ! (
+ BaseWithDestructor<DerivedFromBaseWithDestructor> ) ));
}
diff --git a/tests/expectations/tests/duplicated-namespaces-definitions.rs b/tests/expectations/tests/duplicated-namespaces-definitions.rs
index abc4310c..1b785fd7 100644
--- a/tests/expectations/tests/duplicated-namespaces-definitions.rs
+++ b/tests/expectations/tests/duplicated-namespaces-definitions.rs
@@ -18,14 +18,20 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 8usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . foo as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . baz as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
@@ -41,11 +47,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Foo ) ) . ptr as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Foo ) , "::" ,
+ stringify ! ( ptr ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/enum_and_vtable_mangling.rs b/tests/expectations/tests/enum_and_vtable_mangling.rs
index 420246b5..e372d98b 100644
--- a/tests/expectations/tests/enum_and_vtable_mangling.rs
+++ b/tests/expectations/tests/enum_and_vtable_mangling.rs
@@ -20,10 +20,14 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 16usize);
- assert_eq! (::std::mem::align_of::<C>() , 8usize);
+ assert_eq!(::std::mem::size_of::<C>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe { & ( * ( 0 as * const C ) ) . i as * const _ as usize
- } , 8usize);
+ } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( i ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/forward-declaration-autoptr.rs b/tests/expectations/tests/forward-declaration-autoptr.rs
index a26d476e..ffe5b7b6 100644
--- a/tests/expectations/tests/forward-declaration-autoptr.rs
+++ b/tests/expectations/tests/forward-declaration-autoptr.rs
@@ -19,11 +19,15 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 8usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . m_member as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( m_member ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/forward_declared_complex_types.rs b/tests/expectations/tests/forward_declared_complex_types.rs
index c169ef69..0637fea3 100644
--- a/tests/expectations/tests/forward_declared_complex_types.rs
+++ b/tests/expectations/tests/forward_declared_complex_types.rs
@@ -11,8 +11,10 @@ pub struct Foo_empty {
}
#[test]
fn bindgen_test_layout_Foo_empty() {
- assert_eq!(::std::mem::size_of::<Foo_empty>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo_empty>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo_empty>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo_empty ) ));
+ assert_eq! (::std::mem::align_of::<Foo_empty>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo_empty ) ));
}
impl Clone for Foo_empty {
fn clone(&self) -> Self { *self }
@@ -27,11 +29,15 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 8usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . f as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( f ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/forward_declared_struct.rs b/tests/expectations/tests/forward_declared_struct.rs
index 060156b2..51c61cdf 100644
--- a/tests/expectations/tests/forward_declared_struct.rs
+++ b/tests/expectations/tests/forward_declared_struct.rs
@@ -11,10 +11,14 @@ pub struct a {
}
#[test]
fn bindgen_test_layout_a() {
- assert_eq!(::std::mem::size_of::<a>() , 4usize);
- assert_eq! (::std::mem::align_of::<a>() , 4usize);
+ assert_eq!(::std::mem::size_of::<a>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( a ) ));
+ assert_eq! (::std::mem::align_of::<a>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( a ) ));
assert_eq! (unsafe { & ( * ( 0 as * const a ) ) . b as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( a ) , "::" , stringify
+ ! ( b ) ));
}
impl Clone for a {
fn clone(&self) -> Self { *self }
@@ -26,10 +30,14 @@ pub struct c {
}
#[test]
fn bindgen_test_layout_c() {
- assert_eq!(::std::mem::size_of::<c>() , 4usize);
- assert_eq! (::std::mem::align_of::<c>() , 4usize);
+ assert_eq!(::std::mem::size_of::<c>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( c ) ));
+ assert_eq! (::std::mem::align_of::<c>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( c ) ));
assert_eq! (unsafe { & ( * ( 0 as * const c ) ) . d as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( c ) , "::" , stringify
+ ! ( d ) ));
}
impl Clone for c {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/func_ptr_in_struct.rs b/tests/expectations/tests/func_ptr_in_struct.rs
index e1fac5e4..eba6c7e2 100644
--- a/tests/expectations/tests/func_ptr_in_struct.rs
+++ b/tests/expectations/tests/func_ptr_in_struct.rs
@@ -17,11 +17,15 @@ pub struct Foo {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/inherit_typedef.rs b/tests/expectations/tests/inherit_typedef.rs
index bc8eb472..ff6a62d3 100644
--- a/tests/expectations/tests/inherit_typedef.rs
+++ b/tests/expectations/tests/inherit_typedef.rs
@@ -11,8 +11,10 @@ pub struct Foo {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
@@ -25,8 +27,10 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 1usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/inline_namespace.rs b/tests/expectations/tests/inline_namespace.rs
index 0c007241..6b2c4f80 100644
--- a/tests/expectations/tests/inline_namespace.rs
+++ b/tests/expectations/tests/inline_namespace.rs
@@ -19,11 +19,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . baz as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/inline_namespace_conservative.rs b/tests/expectations/tests/inline_namespace_conservative.rs
index 4bd06cd9..5b74a5f6 100644
--- a/tests/expectations/tests/inline_namespace_conservative.rs
+++ b/tests/expectations/tests/inline_namespace_conservative.rs
@@ -24,11 +24,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . baz as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/inner_const.rs b/tests/expectations/tests/inner_const.rs
index bc7dd7ac..3422f168 100644
--- a/tests/expectations/tests/inner_const.rs
+++ b/tests/expectations/tests/inner_const.rs
@@ -19,11 +19,15 @@ extern "C" {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/inner_template_self.rs b/tests/expectations/tests/inner_template_self.rs
index 02ffea3d..4345e422 100644
--- a/tests/expectations/tests/inner_template_self.rs
+++ b/tests/expectations/tests/inner_template_self.rs
@@ -17,11 +17,15 @@ pub struct InstantiateIt {
}
#[test]
fn bindgen_test_layout_InstantiateIt() {
- assert_eq!(::std::mem::size_of::<InstantiateIt>() , 16usize);
- assert_eq! (::std::mem::align_of::<InstantiateIt>() , 8usize);
+ assert_eq!(::std::mem::size_of::<InstantiateIt>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( InstantiateIt ) ));
+ assert_eq! (::std::mem::align_of::<InstantiateIt>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( InstantiateIt ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const InstantiateIt ) ) . m_list as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( InstantiateIt ) , "::"
+ , stringify ! ( m_list ) ));
}
impl Clone for InstantiateIt {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/issue-372.rs b/tests/expectations/tests/issue-372.rs
index 810be82c..8fcfd33d 100644
--- a/tests/expectations/tests/issue-372.rs
+++ b/tests/expectations/tests/issue-372.rs
@@ -14,11 +14,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_d() {
- assert_eq!(::std::mem::size_of::<d>() , 24usize);
- assert_eq! (::std::mem::align_of::<d>() , 8usize);
+ assert_eq!(::std::mem::size_of::<d>() , 24usize , concat ! (
+ "Size of: " , stringify ! ( d ) ));
+ assert_eq! (::std::mem::align_of::<d>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( d ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const d ) ) . m as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( d ) , "::" ,
+ stringify ! ( m ) ));
}
impl Clone for d {
fn clone(&self) -> Self { *self }
@@ -32,17 +36,25 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_i() {
- assert_eq!(::std::mem::size_of::<i>() , 24usize);
- assert_eq! (::std::mem::align_of::<i>() , 8usize);
+ assert_eq!(::std::mem::size_of::<i>() , 24usize , concat ! (
+ "Size of: " , stringify ! ( i ) ));
+ assert_eq! (::std::mem::align_of::<i>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( i ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const i ) ) . j as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( i ) , "::" ,
+ stringify ! ( j ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const i ) ) . k as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( i ) , "::" ,
+ stringify ! ( k ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const i ) ) . l as * const _ as usize } ,
- 16usize);
+ 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( i ) , "::" ,
+ stringify ! ( l ) ));
}
impl Clone for i {
fn clone(&self) -> Self { *self }
@@ -69,10 +81,14 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_F() {
- assert_eq!(::std::mem::size_of::<F>() , 264usize);
- assert_eq! (::std::mem::align_of::<F>() , 8usize);
+ assert_eq!(::std::mem::size_of::<F>() , 264usize , concat ! (
+ "Size of: " , stringify ! ( F ) ));
+ assert_eq! (::std::mem::align_of::<F>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( F ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const F ) ) . w as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( F ) , "::" ,
+ stringify ! ( w ) ));
}
}
diff --git a/tests/expectations/tests/issue-410.rs b/tests/expectations/tests/issue-410.rs
index 69bf32a0..a8e0d8d4 100644
--- a/tests/expectations/tests/issue-410.rs
+++ b/tests/expectations/tests/issue-410.rs
@@ -17,8 +17,10 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Value() {
- assert_eq!(::std::mem::size_of::<Value>() , 1usize);
- assert_eq! (::std::mem::align_of::<Value>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Value>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Value ) ));
+ assert_eq! (::std::mem::align_of::<Value>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Value ) ));
}
extern "C" {
#[link_name = "_ZN2JS5Value1aE10JSWhyMagic"]
diff --git a/tests/expectations/tests/issue-447.rs b/tests/expectations/tests/issue-447.rs
index b315e008..0582f412 100644
--- a/tests/expectations/tests/issue-447.rs
+++ b/tests/expectations/tests/issue-447.rs
@@ -21,9 +21,13 @@ pub mod root {
#[test]
fn bindgen_test_layout_GuardObjectNotifier() {
assert_eq!(::std::mem::size_of::<GuardObjectNotifier>() ,
- 1usize);
+ 1usize , concat ! (
+ "Size of: " , stringify ! ( GuardObjectNotifier )
+ ));
assert_eq! (::std::mem::align_of::<GuardObjectNotifier>() ,
- 1usize);
+ 1usize , concat ! (
+ "Alignment of " , stringify ! (
+ GuardObjectNotifier ) ));
}
impl Clone for GuardObjectNotifier {
fn clone(&self) -> Self { *self }
@@ -37,8 +41,12 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_JSAutoCompartment() {
- assert_eq!(::std::mem::size_of::<JSAutoCompartment>() , 1usize);
- assert_eq! (::std::mem::align_of::<JSAutoCompartment>() , 1usize);
+ assert_eq!(::std::mem::size_of::<JSAutoCompartment>() , 1usize ,
+ concat ! ( "Size of: " , stringify ! ( JSAutoCompartment )
+ ));
+ assert_eq! (::std::mem::align_of::<JSAutoCompartment>() , 1usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( JSAutoCompartment ) ));
}
extern "C" {
#[link_name =
diff --git a/tests/expectations/tests/issue_311.rs b/tests/expectations/tests/issue_311.rs
index 62b95806..debc893d 100644
--- a/tests/expectations/tests/issue_311.rs
+++ b/tests/expectations/tests/issue_311.rs
@@ -20,17 +20,23 @@ pub mod root {
#[test]
fn bindgen_test_layout_jsval_layout__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_1>() ,
- 1usize);
+ 1usize , concat ! (
+ "Size of: " , stringify ! ( jsval_layout__bindgen_ty_1 )
+ ));
assert_eq! (::std::mem::align_of::<jsval_layout__bindgen_ty_1>() ,
- 1usize);
+ 1usize , concat ! (
+ "Alignment of " , stringify ! ( jsval_layout__bindgen_ty_1
+ ) ));
}
impl Clone for jsval_layout__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_jsval_layout() {
- assert_eq!(::std::mem::size_of::<jsval_layout>() , 1usize);
- assert_eq! (::std::mem::align_of::<jsval_layout>() , 1usize);
+ assert_eq!(::std::mem::size_of::<jsval_layout>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( jsval_layout ) ));
+ assert_eq! (::std::mem::align_of::<jsval_layout>() , 1usize , concat !
+ ( "Alignment of " , stringify ! ( jsval_layout ) ));
}
impl Clone for jsval_layout {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/jsval_layout_opaque.rs b/tests/expectations/tests/jsval_layout_opaque.rs
index d77493c7..ac092587 100644
--- a/tests/expectations/tests/jsval_layout_opaque.rs
+++ b/tests/expectations/tests/jsval_layout_opaque.rs
@@ -114,9 +114,13 @@ pub struct jsval_layout__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_jsval_layout__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<jsval_layout__bindgen_ty_1>() ,
- 8usize);
+ assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_1>() , 8usize ,
+ concat ! (
+ "Size of: " , stringify ! ( jsval_layout__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<jsval_layout__bindgen_ty_1>() , 8usize
+ , concat ! (
+ "Alignment of " , stringify ! ( jsval_layout__bindgen_ty_1 )
+ ));
}
impl Clone for jsval_layout__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -168,62 +172,98 @@ pub struct jsval_layout__bindgen_ty_2__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_jsval_layout__bindgen_ty_2__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_2__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Size of: " , stringify ! (
+ jsval_layout__bindgen_ty_2__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<jsval_layout__bindgen_ty_2__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ jsval_layout__bindgen_ty_2__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const jsval_layout__bindgen_ty_2__bindgen_ty_1 ) )
- . i32 as * const _ as usize } , 0usize);
+ . i32 as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ jsval_layout__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify
+ ! ( i32 ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const jsval_layout__bindgen_ty_2__bindgen_ty_1 ) )
- . u32 as * const _ as usize } , 0usize);
+ . u32 as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ jsval_layout__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify
+ ! ( u32 ) ));
assert_eq! (unsafe {
& (
* ( 0 as * const jsval_layout__bindgen_ty_2__bindgen_ty_1 ) )
- . why as * const _ as usize } , 0usize);
+ . why as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ jsval_layout__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify
+ ! ( why ) ));
}
impl Clone for jsval_layout__bindgen_ty_2__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_jsval_layout__bindgen_ty_2() {
- assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_2>() , 4usize);
- assert_eq! (::std::mem::align_of::<jsval_layout__bindgen_ty_2>() ,
- 4usize);
+ assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_2>() , 4usize ,
+ concat ! (
+ "Size of: " , stringify ! ( jsval_layout__bindgen_ty_2 ) ));
+ assert_eq! (::std::mem::align_of::<jsval_layout__bindgen_ty_2>() , 4usize
+ , concat ! (
+ "Alignment of " , stringify ! ( jsval_layout__bindgen_ty_2 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout__bindgen_ty_2 ) ) . payload
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ jsval_layout__bindgen_ty_2 ) , "::" , stringify ! ( payload )
+ ));
}
impl Clone for jsval_layout__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_jsval_layout() {
- assert_eq!(::std::mem::size_of::<jsval_layout>() , 8usize);
- assert_eq! (::std::mem::align_of::<jsval_layout>() , 8usize);
+ assert_eq!(::std::mem::size_of::<jsval_layout>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( jsval_layout ) ));
+ assert_eq! (::std::mem::align_of::<jsval_layout>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( jsval_layout ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . asBits as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( asBits ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . debugView as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( debugView ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . s as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( s ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . asDouble as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( asDouble ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . asPtr as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( asPtr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . asWord as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( asWord ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const jsval_layout ) ) . asUIntPtr as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( jsval_layout ) , "::" ,
+ stringify ! ( asUIntPtr ) ));
}
impl Clone for jsval_layout {
fn clone(&self) -> Self { *self }
@@ -235,11 +275,15 @@ pub struct Value {
}
#[test]
fn bindgen_test_layout_Value() {
- assert_eq!(::std::mem::size_of::<Value>() , 8usize);
- assert_eq! (::std::mem::align_of::<Value>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Value>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Value ) ));
+ assert_eq! (::std::mem::align_of::<Value>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Value ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Value ) ) . data as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Value ) , "::" ,
+ stringify ! ( data ) ));
}
impl Clone for Value {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout.rs b/tests/expectations/tests/layout.rs
index 2946112f..5fae570c 100644
--- a/tests/expectations/tests/layout.rs
+++ b/tests/expectations/tests/layout.rs
@@ -46,7 +46,8 @@ pub struct header {
}
#[test]
fn bindgen_test_layout_header() {
- assert_eq!(::std::mem::size_of::<header>() , 16usize);
+ assert_eq!(::std::mem::size_of::<header>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( header ) ));
}
impl Clone for header {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout_align.rs b/tests/expectations/tests/layout_align.rs
index 8b243f53..0479521c 100644
--- a/tests/expectations/tests/layout_align.rs
+++ b/tests/expectations/tests/layout_align.rs
@@ -53,8 +53,10 @@ pub struct rte_kni_fifo {
}
#[test]
fn bindgen_test_layout_rte_kni_fifo() {
- assert_eq!(::std::mem::size_of::<rte_kni_fifo>() , 16usize);
- assert_eq! (::std::mem::align_of::<rte_kni_fifo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_kni_fifo>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( rte_kni_fifo ) ));
+ assert_eq! (::std::mem::align_of::<rte_kni_fifo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( rte_kni_fifo ) ));
}
impl Clone for rte_kni_fifo {
fn clone(&self) -> Self { *self }
@@ -69,11 +71,15 @@ pub struct rte_eth_link {
}
#[test]
fn bindgen_test_layout_rte_eth_link() {
- assert_eq!(::std::mem::size_of::<rte_eth_link>() , 8usize);
- assert_eq! (::std::mem::align_of::<rte_eth_link>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_link>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( rte_eth_link ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_link>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( rte_eth_link ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_link ) ) . link_speed as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_link ) , "::" ,
+ stringify ! ( link_speed ) ));
}
impl Clone for rte_eth_link {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout_arp.rs b/tests/expectations/tests/layout_arp.rs
index f1feb92b..c868f627 100644
--- a/tests/expectations/tests/layout_arp.rs
+++ b/tests/expectations/tests/layout_arp.rs
@@ -31,11 +31,15 @@ pub struct ether_addr {
}
#[test]
fn bindgen_test_layout_ether_addr() {
- assert_eq!(::std::mem::size_of::<ether_addr>() , 6usize);
- assert_eq! (::std::mem::align_of::<ether_addr>() , 1usize);
+ assert_eq!(::std::mem::size_of::<ether_addr>() , 6usize , concat ! (
+ "Size of: " , stringify ! ( ether_addr ) ));
+ assert_eq! (::std::mem::align_of::<ether_addr>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( ether_addr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ether_addr ) ) . addr_bytes as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( ether_addr ) , "::" ,
+ stringify ! ( addr_bytes ) ));
}
impl Clone for ether_addr {
fn clone(&self) -> Self { *self }
@@ -57,20 +61,30 @@ pub struct arp_ipv4 {
}
#[test]
fn bindgen_test_layout_arp_ipv4() {
- assert_eq!(::std::mem::size_of::<arp_ipv4>() , 20usize);
- assert_eq! (::std::mem::align_of::<arp_ipv4>() , 1usize);
+ assert_eq!(::std::mem::size_of::<arp_ipv4>() , 20usize , concat ! (
+ "Size of: " , stringify ! ( arp_ipv4 ) ));
+ assert_eq! (::std::mem::align_of::<arp_ipv4>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( arp_ipv4 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_ipv4 ) ) . arp_sha as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_ipv4 ) , "::" ,
+ stringify ! ( arp_sha ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_ipv4 ) ) . arp_sip as * const _ as
- usize } , 6usize);
+ usize } , 6usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_ipv4 ) , "::" ,
+ stringify ! ( arp_sip ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_ipv4 ) ) . arp_tha as * const _ as
- usize } , 10usize);
+ usize } , 10usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_ipv4 ) , "::" ,
+ stringify ! ( arp_tha ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_ipv4 ) ) . arp_tip as * const _ as
- usize } , 16usize);
+ usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_ipv4 ) , "::" ,
+ stringify ! ( arp_tip ) ));
}
impl Clone for arp_ipv4 {
fn clone(&self) -> Self { *self }
@@ -90,26 +104,40 @@ pub struct arp_hdr {
}
#[test]
fn bindgen_test_layout_arp_hdr() {
- assert_eq!(::std::mem::size_of::<arp_hdr>() , 28usize);
- assert_eq! (::std::mem::align_of::<arp_hdr>() , 1usize);
+ assert_eq!(::std::mem::size_of::<arp_hdr>() , 28usize , concat ! (
+ "Size of: " , stringify ! ( arp_hdr ) ));
+ assert_eq! (::std::mem::align_of::<arp_hdr>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( arp_hdr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_hdr ) ) . arp_hrd as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_hdr ) , "::" ,
+ stringify ! ( arp_hrd ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_hdr ) ) . arp_pro as * const _ as
- usize } , 2usize);
+ usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_hdr ) , "::" ,
+ stringify ! ( arp_pro ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_hdr ) ) . arp_hln as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_hdr ) , "::" ,
+ stringify ! ( arp_hln ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_hdr ) ) . arp_pln as * const _ as
- usize } , 5usize);
+ usize } , 5usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_hdr ) , "::" ,
+ stringify ! ( arp_pln ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_hdr ) ) . arp_op as * const _ as
- usize } , 6usize);
+ usize } , 6usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_hdr ) , "::" ,
+ stringify ! ( arp_op ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const arp_hdr ) ) . arp_data as * const _ as
- usize } , 8usize);
+ usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( arp_hdr ) , "::" ,
+ stringify ! ( arp_data ) ));
}
impl Clone for arp_hdr {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout_array.rs b/tests/expectations/tests/layout_array.rs
index 080a0a83..bc690fb6 100644
--- a/tests/expectations/tests/layout_array.rs
+++ b/tests/expectations/tests/layout_array.rs
@@ -73,25 +73,38 @@ pub struct rte_mempool_ops {
}
#[test]
fn bindgen_test_layout_rte_mempool_ops() {
- assert_eq!(::std::mem::size_of::<rte_mempool_ops>() , 128usize);
+ assert_eq!(::std::mem::size_of::<rte_mempool_ops>() , 128usize , concat !
+ ( "Size of: " , stringify ! ( rte_mempool_ops ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops ) ) . name as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops ) ,
+ "::" , stringify ! ( name ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops ) ) . alloc as * const _
- as usize } , 32usize);
+ as usize } , 32usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops ) ,
+ "::" , stringify ! ( alloc ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops ) ) . free as * const _
- as usize } , 40usize);
+ as usize } , 40usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops ) ,
+ "::" , stringify ! ( free ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops ) ) . enqueue as * const
- _ as usize } , 48usize);
+ _ as usize } , 48usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops ) ,
+ "::" , stringify ! ( enqueue ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops ) ) . dequeue as * const
- _ as usize } , 56usize);
+ _ as usize } , 56usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops ) ,
+ "::" , stringify ! ( dequeue ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops ) ) . get_count as *
- const _ as usize } , 64usize);
+ const _ as usize } , 64usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops ) ,
+ "::" , stringify ! ( get_count ) ));
}
impl Clone for rte_mempool_ops {
fn clone(&self) -> Self { *self }
@@ -107,11 +120,15 @@ pub struct _bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( _bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( _bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) . locked as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( locked ) ));
}
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -141,16 +158,24 @@ pub struct rte_mempool_ops_table {
}
#[test]
fn bindgen_test_layout_rte_mempool_ops_table() {
- assert_eq!(::std::mem::size_of::<rte_mempool_ops_table>() , 2112usize);
+ assert_eq!(::std::mem::size_of::<rte_mempool_ops_table>() , 2112usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_mempool_ops_table )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops_table ) ) . sl as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops_table )
+ , "::" , stringify ! ( sl ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops_table ) ) . num_ops as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops_table )
+ , "::" , stringify ! ( num_ops ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mempool_ops_table ) ) . ops as *
- const _ as usize } , 64usize);
+ const _ as usize } , 64usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mempool_ops_table )
+ , "::" , stringify ! ( ops ) ));
}
impl Clone for rte_mempool_ops_table {
fn clone(&self) -> Self { *self }
@@ -176,30 +201,47 @@ pub struct malloc_heap__bindgen_ty_1 {
pub struct malloc_heap__bindgen_ty_1_malloc_elem([u8; 0]);
#[test]
fn bindgen_test_layout_malloc_heap__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<malloc_heap__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<malloc_heap__bindgen_ty_1>() , 8usize);
+ assert_eq!(::std::mem::size_of::<malloc_heap__bindgen_ty_1>() , 8usize ,
+ concat ! (
+ "Size of: " , stringify ! ( malloc_heap__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<malloc_heap__bindgen_ty_1>() , 8usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( malloc_heap__bindgen_ty_1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const malloc_heap__bindgen_ty_1 ) ) . lh_first
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ malloc_heap__bindgen_ty_1 ) , "::" , stringify ! ( lh_first )
+ ));
}
impl Clone for malloc_heap__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_malloc_heap() {
- assert_eq!(::std::mem::size_of::<malloc_heap>() , 128usize);
+ assert_eq!(::std::mem::size_of::<malloc_heap>() , 128usize , concat ! (
+ "Size of: " , stringify ! ( malloc_heap ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const malloc_heap ) ) . lock as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( malloc_heap ) , "::" ,
+ stringify ! ( lock ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const malloc_heap ) ) . free_head as * const _
- as usize } , 8usize);
+ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( malloc_heap ) , "::" ,
+ stringify ! ( free_head ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const malloc_heap ) ) . alloc_count as * const
- _ as usize } , 112usize);
+ _ as usize } , 112usize , concat ! (
+ "Alignment of field: " , stringify ! ( malloc_heap ) , "::" ,
+ stringify ! ( alloc_count ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const malloc_heap ) ) . total_size as * const _
- as usize } , 120usize);
+ as usize } , 120usize , concat ! (
+ "Alignment of field: " , stringify ! ( malloc_heap ) , "::" ,
+ stringify ! ( total_size ) ));
}
impl Clone for malloc_heap {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout_cmdline_token.rs b/tests/expectations/tests/layout_cmdline_token.rs
index 4966b307..be4944bb 100644
--- a/tests/expectations/tests/layout_cmdline_token.rs
+++ b/tests/expectations/tests/layout_cmdline_token.rs
@@ -72,35 +72,58 @@ pub struct cmdline_token_hdr_cmdline_token_ops {
#[test]
fn bindgen_test_layout_cmdline_token_hdr_cmdline_token_ops() {
assert_eq!(::std::mem::size_of::<cmdline_token_hdr_cmdline_token_ops>() ,
- 32usize);
+ 32usize , concat ! (
+ "Size of: " , stringify ! ( cmdline_token_hdr_cmdline_token_ops
+ ) ));
assert_eq! (::std::mem::align_of::<cmdline_token_hdr_cmdline_token_ops>()
- , 8usize);
+ , 8usize , concat ! (
+ "Alignment of " , stringify ! (
+ cmdline_token_hdr_cmdline_token_ops ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_hdr_cmdline_token_ops ) ) .
- parse as * const _ as usize } , 0usize);
+ parse as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ cmdline_token_hdr_cmdline_token_ops ) , "::" , stringify ! (
+ parse ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_hdr_cmdline_token_ops ) ) .
- complete_get_nb as * const _ as usize } , 8usize);
+ complete_get_nb as * const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ cmdline_token_hdr_cmdline_token_ops ) , "::" , stringify ! (
+ complete_get_nb ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_hdr_cmdline_token_ops ) ) .
- complete_get_elt as * const _ as usize } , 16usize);
+ complete_get_elt as * const _ as usize } , 16usize , concat !
+ (
+ "Alignment of field: " , stringify ! (
+ cmdline_token_hdr_cmdline_token_ops ) , "::" , stringify ! (
+ complete_get_elt ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_hdr_cmdline_token_ops ) ) .
- get_help as * const _ as usize } , 24usize);
+ get_help as * const _ as usize } , 24usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ cmdline_token_hdr_cmdline_token_ops ) , "::" , stringify ! (
+ get_help ) ));
}
impl Clone for cmdline_token_hdr_cmdline_token_ops {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_cmdline_token_hdr() {
- assert_eq!(::std::mem::size_of::<cmdline_token_hdr>() , 16usize);
- assert_eq! (::std::mem::align_of::<cmdline_token_hdr>() , 8usize);
+ assert_eq!(::std::mem::size_of::<cmdline_token_hdr>() , 16usize , concat !
+ ( "Size of: " , stringify ! ( cmdline_token_hdr ) ));
+ assert_eq! (::std::mem::align_of::<cmdline_token_hdr>() , 8usize , concat
+ ! ( "Alignment of " , stringify ! ( cmdline_token_hdr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_hdr ) ) . ops as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( cmdline_token_hdr ) ,
+ "::" , stringify ! ( ops ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_hdr ) ) . offset as * const
- _ as usize } , 8usize);
+ _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( cmdline_token_hdr ) ,
+ "::" , stringify ! ( offset ) ));
}
impl Clone for cmdline_token_hdr {
fn clone(&self) -> Self { *self }
@@ -125,11 +148,17 @@ pub struct cmdline_token_num_data {
}
#[test]
fn bindgen_test_layout_cmdline_token_num_data() {
- assert_eq!(::std::mem::size_of::<cmdline_token_num_data>() , 4usize);
- assert_eq! (::std::mem::align_of::<cmdline_token_num_data>() , 4usize);
+ assert_eq!(::std::mem::size_of::<cmdline_token_num_data>() , 4usize ,
+ concat ! ( "Size of: " , stringify ! ( cmdline_token_num_data )
+ ));
+ assert_eq! (::std::mem::align_of::<cmdline_token_num_data>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( cmdline_token_num_data ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_num_data ) ) . type_ as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( cmdline_token_num_data
+ ) , "::" , stringify ! ( type_ ) ));
}
impl Clone for cmdline_token_num_data {
fn clone(&self) -> Self { *self }
@@ -142,14 +171,20 @@ pub struct cmdline_token_num {
}
#[test]
fn bindgen_test_layout_cmdline_token_num() {
- assert_eq!(::std::mem::size_of::<cmdline_token_num>() , 24usize);
- assert_eq! (::std::mem::align_of::<cmdline_token_num>() , 8usize);
+ assert_eq!(::std::mem::size_of::<cmdline_token_num>() , 24usize , concat !
+ ( "Size of: " , stringify ! ( cmdline_token_num ) ));
+ assert_eq! (::std::mem::align_of::<cmdline_token_num>() , 8usize , concat
+ ! ( "Alignment of " , stringify ! ( cmdline_token_num ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_num ) ) . hdr as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( cmdline_token_num ) ,
+ "::" , stringify ! ( hdr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const cmdline_token_num ) ) . num_data as *
- const _ as usize } , 16usize);
+ const _ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( cmdline_token_num ) ,
+ "::" , stringify ! ( num_data ) ));
}
impl Clone for cmdline_token_num {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout_eth_conf.rs b/tests/expectations/tests/layout_eth_conf.rs
index 70d050b0..0034e707 100644
--- a/tests/expectations/tests/layout_eth_conf.rs
+++ b/tests/expectations/tests/layout_eth_conf.rs
@@ -92,17 +92,25 @@ pub struct rte_eth_rxmode {
}
#[test]
fn bindgen_test_layout_rte_eth_rxmode() {
- assert_eq!(::std::mem::size_of::<rte_eth_rxmode>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_eth_rxmode>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_rxmode>() , 12usize , concat ! (
+ "Size of: " , stringify ! ( rte_eth_rxmode ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_rxmode>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_eth_rxmode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_rxmode ) ) . mq_mode as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_rxmode ) , "::"
+ , stringify ! ( mq_mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_rxmode ) ) . max_rx_pkt_len as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_rxmode ) , "::"
+ , stringify ! ( max_rx_pkt_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_rxmode ) ) . split_hdr_size as *
- const _ as usize } , 8usize);
+ const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_rxmode ) , "::"
+ , stringify ! ( split_hdr_size ) ));
}
impl Clone for rte_eth_rxmode {
fn clone(&self) -> Self { *self }
@@ -242,14 +250,20 @@ pub struct rte_eth_txmode {
}
#[test]
fn bindgen_test_layout_rte_eth_txmode() {
- assert_eq!(::std::mem::size_of::<rte_eth_txmode>() , 8usize);
- assert_eq! (::std::mem::align_of::<rte_eth_txmode>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_txmode>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( rte_eth_txmode ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_txmode>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_eth_txmode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_txmode ) ) . mq_mode as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_txmode ) , "::"
+ , stringify ! ( mq_mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_txmode ) ) . pvid as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_txmode ) , "::"
+ , stringify ! ( pvid ) ));
}
impl Clone for rte_eth_txmode {
fn clone(&self) -> Self { *self }
@@ -321,17 +335,25 @@ pub struct rte_eth_rss_conf {
}
#[test]
fn bindgen_test_layout_rte_eth_rss_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_rss_conf>() , 24usize);
- assert_eq! (::std::mem::align_of::<rte_eth_rss_conf>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_rss_conf>() , 24usize , concat !
+ ( "Size of: " , stringify ! ( rte_eth_rss_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_rss_conf>() , 8usize , concat !
+ ( "Alignment of " , stringify ! ( rte_eth_rss_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_rss_conf ) ) . rss_key as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_rss_conf ) ,
+ "::" , stringify ! ( rss_key ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_rss_conf ) ) . rss_key_len as *
- const _ as usize } , 8usize);
+ const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_rss_conf ) ,
+ "::" , stringify ! ( rss_key_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_rss_conf ) ) . rss_hf as * const
- _ as usize } , 16usize);
+ _ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_rss_conf ) ,
+ "::" , stringify ! ( rss_hf ) ));
}
impl Clone for rte_eth_rss_conf {
fn clone(&self) -> Self { *self }
@@ -391,41 +413,68 @@ pub struct rte_eth_vmdq_dcb_conf__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_eth_vmdq_dcb_conf__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_eth_vmdq_dcb_conf__bindgen_ty_1>() ,
- 16usize);
+ 16usize , concat ! (
+ "Size of: " , stringify ! ( rte_eth_vmdq_dcb_conf__bindgen_ty_1
+ ) ));
assert_eq! (::std::mem::align_of::<rte_eth_vmdq_dcb_conf__bindgen_ty_1>()
- , 8usize);
+ , 8usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_eth_vmdq_dcb_conf__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf__bindgen_ty_1 ) ) .
- vlan_id as * const _ as usize } , 0usize);
+ vlan_id as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_vmdq_dcb_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ vlan_id ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf__bindgen_ty_1 ) ) .
- pools as * const _ as usize } , 8usize);
+ pools as * const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_vmdq_dcb_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ pools ) ));
}
impl Clone for rte_eth_vmdq_dcb_conf__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_eth_vmdq_dcb_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_vmdq_dcb_conf>() , 1040usize);
- assert_eq! (::std::mem::align_of::<rte_eth_vmdq_dcb_conf>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_vmdq_dcb_conf>() , 1040usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_eth_vmdq_dcb_conf>() , 8usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_vmdq_dcb_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf ) ) .
- nb_queue_pools as * const _ as usize } , 0usize);
+ nb_queue_pools as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ , "::" , stringify ! ( nb_queue_pools ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf ) ) .
- enable_default_pool as * const _ as usize } , 4usize);
+ enable_default_pool as * const _ as usize } , 4usize , concat
+ ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ , "::" , stringify ! ( enable_default_pool ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf ) ) . default_pool
- as * const _ as usize } , 5usize);
+ as * const _ as usize } , 5usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ , "::" , stringify ! ( default_pool ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf ) ) . nb_pool_maps
- as * const _ as usize } , 6usize);
+ as * const _ as usize } , 6usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ , "::" , stringify ! ( nb_pool_maps ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf ) ) . pool_map as *
- const _ as usize } , 8usize);
+ const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ , "::" , stringify ! ( pool_map ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_conf ) ) . dcb_tc as *
- const _ as usize } , 1032usize);
+ const _ as usize } , 1032usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_dcb_conf )
+ , "::" , stringify ! ( dcb_tc ) ));
}
#[repr(C)]
#[derive(Debug, Copy)]
@@ -437,14 +486,21 @@ pub struct rte_eth_dcb_rx_conf {
}
#[test]
fn bindgen_test_layout_rte_eth_dcb_rx_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_dcb_rx_conf>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_eth_dcb_rx_conf>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_dcb_rx_conf>() , 12usize , concat
+ ! ( "Size of: " , stringify ! ( rte_eth_dcb_rx_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_dcb_rx_conf>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_dcb_rx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_dcb_rx_conf ) ) . nb_tcs as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_dcb_rx_conf ) ,
+ "::" , stringify ! ( nb_tcs ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_dcb_rx_conf ) ) . dcb_tc as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_dcb_rx_conf ) ,
+ "::" , stringify ! ( dcb_tc ) ));
}
impl Clone for rte_eth_dcb_rx_conf {
fn clone(&self) -> Self { *self }
@@ -459,14 +515,23 @@ pub struct rte_eth_vmdq_dcb_tx_conf {
}
#[test]
fn bindgen_test_layout_rte_eth_vmdq_dcb_tx_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_vmdq_dcb_tx_conf>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_eth_vmdq_dcb_tx_conf>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_vmdq_dcb_tx_conf>() , 12usize ,
+ concat ! (
+ "Size of: " , stringify ! ( rte_eth_vmdq_dcb_tx_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_vmdq_dcb_tx_conf>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_vmdq_dcb_tx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_tx_conf ) ) .
- nb_queue_pools as * const _ as usize } , 0usize);
+ nb_queue_pools as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_vmdq_dcb_tx_conf ) , "::" , stringify ! (
+ nb_queue_pools ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_dcb_tx_conf ) ) . dcb_tc as
- * const _ as usize } , 4usize);
+ * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_vmdq_dcb_tx_conf ) , "::" , stringify ! ( dcb_tc ) ));
}
impl Clone for rte_eth_vmdq_dcb_tx_conf {
fn clone(&self) -> Self { *self }
@@ -481,14 +546,21 @@ pub struct rte_eth_dcb_tx_conf {
}
#[test]
fn bindgen_test_layout_rte_eth_dcb_tx_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_dcb_tx_conf>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_eth_dcb_tx_conf>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_dcb_tx_conf>() , 12usize , concat
+ ! ( "Size of: " , stringify ! ( rte_eth_dcb_tx_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_dcb_tx_conf>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_dcb_tx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_dcb_tx_conf ) ) . nb_tcs as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_dcb_tx_conf ) ,
+ "::" , stringify ! ( nb_tcs ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_dcb_tx_conf ) ) . dcb_tc as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_dcb_tx_conf ) ,
+ "::" , stringify ! ( dcb_tc ) ));
}
impl Clone for rte_eth_dcb_tx_conf {
fn clone(&self) -> Self { *self }
@@ -501,11 +573,16 @@ pub struct rte_eth_vmdq_tx_conf {
}
#[test]
fn bindgen_test_layout_rte_eth_vmdq_tx_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_vmdq_tx_conf>() , 4usize);
- assert_eq! (::std::mem::align_of::<rte_eth_vmdq_tx_conf>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_vmdq_tx_conf>() , 4usize , concat
+ ! ( "Size of: " , stringify ! ( rte_eth_vmdq_tx_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_vmdq_tx_conf>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_vmdq_tx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_tx_conf ) ) . nb_queue_pools
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_tx_conf )
+ , "::" , stringify ! ( nb_queue_pools ) ));
}
impl Clone for rte_eth_vmdq_tx_conf {
fn clone(&self) -> Self { *self }
@@ -538,44 +615,73 @@ pub struct rte_eth_vmdq_rx_conf__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_eth_vmdq_rx_conf__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_eth_vmdq_rx_conf__bindgen_ty_1>() ,
- 16usize);
+ 16usize , concat ! (
+ "Size of: " , stringify ! ( rte_eth_vmdq_rx_conf__bindgen_ty_1
+ ) ));
assert_eq! (::std::mem::align_of::<rte_eth_vmdq_rx_conf__bindgen_ty_1>() ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_eth_vmdq_rx_conf__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf__bindgen_ty_1 ) ) .
- vlan_id as * const _ as usize } , 0usize);
+ vlan_id as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_vmdq_rx_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ vlan_id ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf__bindgen_ty_1 ) ) .
- pools as * const _ as usize } , 8usize);
+ pools as * const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_vmdq_rx_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ pools ) ));
}
impl Clone for rte_eth_vmdq_rx_conf__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_eth_vmdq_rx_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_vmdq_rx_conf>() , 1040usize);
- assert_eq! (::std::mem::align_of::<rte_eth_vmdq_rx_conf>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_vmdq_rx_conf>() , 1040usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_eth_vmdq_rx_conf>() , 8usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_vmdq_rx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) . nb_queue_pools
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( nb_queue_pools ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) .
- enable_default_pool as * const _ as usize } , 4usize);
+ enable_default_pool as * const _ as usize } , 4usize , concat
+ ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( enable_default_pool ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) . default_pool
- as * const _ as usize } , 5usize);
+ as * const _ as usize } , 5usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( default_pool ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) .
- enable_loop_back as * const _ as usize } , 6usize);
+ enable_loop_back as * const _ as usize } , 6usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( enable_loop_back ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) . nb_pool_maps
- as * const _ as usize } , 7usize);
+ as * const _ as usize } , 7usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( nb_pool_maps ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) . rx_mode as *
- const _ as usize } , 8usize);
+ const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( rx_mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_vmdq_rx_conf ) ) . pool_map as *
- const _ as usize } , 16usize);
+ const _ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_vmdq_rx_conf )
+ , "::" , stringify ! ( pool_map ) ));
}
#[repr(u32)]
/**
@@ -629,23 +735,35 @@ pub struct rte_eth_ipv4_flow {
}
#[test]
fn bindgen_test_layout_rte_eth_ipv4_flow() {
- assert_eq!(::std::mem::size_of::<rte_eth_ipv4_flow>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_eth_ipv4_flow>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_ipv4_flow>() , 12usize , concat !
+ ( "Size of: " , stringify ! ( rte_eth_ipv4_flow ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_ipv4_flow>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( rte_eth_ipv4_flow ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv4_flow ) ) . src_ip as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv4_flow ) ,
+ "::" , stringify ! ( src_ip ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv4_flow ) ) . dst_ip as * const
- _ as usize } , 4usize);
+ _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv4_flow ) ,
+ "::" , stringify ! ( dst_ip ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv4_flow ) ) . tos as * const _
- as usize } , 8usize);
+ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv4_flow ) ,
+ "::" , stringify ! ( tos ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv4_flow ) ) . ttl as * const _
- as usize } , 9usize);
+ as usize } , 9usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv4_flow ) ,
+ "::" , stringify ! ( ttl ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv4_flow ) ) . proto as * const
- _ as usize } , 10usize);
+ _ as usize } , 10usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv4_flow ) ,
+ "::" , stringify ! ( proto ) ));
}
impl Clone for rte_eth_ipv4_flow {
fn clone(&self) -> Self { *self }
@@ -669,23 +787,35 @@ pub struct rte_eth_ipv6_flow {
}
#[test]
fn bindgen_test_layout_rte_eth_ipv6_flow() {
- assert_eq!(::std::mem::size_of::<rte_eth_ipv6_flow>() , 36usize);
- assert_eq! (::std::mem::align_of::<rte_eth_ipv6_flow>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_ipv6_flow>() , 36usize , concat !
+ ( "Size of: " , stringify ! ( rte_eth_ipv6_flow ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_ipv6_flow>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( rte_eth_ipv6_flow ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv6_flow ) ) . src_ip as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv6_flow ) ,
+ "::" , stringify ! ( src_ip ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv6_flow ) ) . dst_ip as * const
- _ as usize } , 16usize);
+ _ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv6_flow ) ,
+ "::" , stringify ! ( dst_ip ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv6_flow ) ) . tc as * const _
- as usize } , 32usize);
+ as usize } , 32usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv6_flow ) ,
+ "::" , stringify ! ( tc ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv6_flow ) ) . proto as * const
- _ as usize } , 33usize);
+ _ as usize } , 33usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv6_flow ) ,
+ "::" , stringify ! ( proto ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_ipv6_flow ) ) . hop_limits as *
- const _ as usize } , 34usize);
+ const _ as usize } , 34usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_ipv6_flow ) ,
+ "::" , stringify ! ( hop_limits ) ));
}
impl Clone for rte_eth_ipv6_flow {
fn clone(&self) -> Self { *self }
@@ -718,32 +848,51 @@ pub struct rte_eth_fdir_masks {
}
#[test]
fn bindgen_test_layout_rte_eth_fdir_masks() {
- assert_eq!(::std::mem::size_of::<rte_eth_fdir_masks>() , 68usize);
- assert_eq! (::std::mem::align_of::<rte_eth_fdir_masks>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_fdir_masks>() , 68usize , concat
+ ! ( "Size of: " , stringify ! ( rte_eth_fdir_masks ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_fdir_masks>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( rte_eth_fdir_masks ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . vlan_tci_mask as
- * const _ as usize } , 0usize);
+ * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( vlan_tci_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . ipv4_mask as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( ipv4_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . ipv6_mask as *
- const _ as usize } , 16usize);
+ const _ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( ipv6_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . src_port_mask as
- * const _ as usize } , 52usize);
+ * const _ as usize } , 52usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( src_port_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . dst_port_mask as
- * const _ as usize } , 54usize);
+ * const _ as usize } , 54usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( dst_port_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) .
- mac_addr_byte_mask as * const _ as usize } , 56usize);
+ mac_addr_byte_mask as * const _ as usize } , 56usize , concat
+ ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( mac_addr_byte_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . tunnel_id_mask
- as * const _ as usize } , 60usize);
+ as * const _ as usize } , 60usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( tunnel_id_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_masks ) ) . tunnel_type_mask
- as * const _ as usize } , 64usize);
+ as * const _ as usize } , 64usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_masks ) ,
+ "::" , stringify ! ( tunnel_type_mask ) ));
}
impl Clone for rte_eth_fdir_masks {
fn clone(&self) -> Self { *self }
@@ -774,14 +923,23 @@ pub struct rte_eth_flex_payload_cfg {
}
#[test]
fn bindgen_test_layout_rte_eth_flex_payload_cfg() {
- assert_eq!(::std::mem::size_of::<rte_eth_flex_payload_cfg>() , 36usize);
- assert_eq! (::std::mem::align_of::<rte_eth_flex_payload_cfg>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_flex_payload_cfg>() , 36usize ,
+ concat ! (
+ "Size of: " , stringify ! ( rte_eth_flex_payload_cfg ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_flex_payload_cfg>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_flex_payload_cfg ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_flex_payload_cfg ) ) . type_ as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_flex_payload_cfg ) , "::" , stringify ! ( type_ ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_flex_payload_cfg ) ) . src_offset
- as * const _ as usize } , 4usize);
+ as * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_flex_payload_cfg ) , "::" , stringify ! ( src_offset )
+ ));
}
impl Clone for rte_eth_flex_payload_cfg {
fn clone(&self) -> Self { *self }
@@ -798,14 +956,22 @@ pub struct rte_eth_fdir_flex_mask {
}
#[test]
fn bindgen_test_layout_rte_eth_fdir_flex_mask() {
- assert_eq!(::std::mem::size_of::<rte_eth_fdir_flex_mask>() , 18usize);
- assert_eq! (::std::mem::align_of::<rte_eth_fdir_flex_mask>() , 2usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_fdir_flex_mask>() , 18usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_eth_fdir_flex_mask )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_eth_fdir_flex_mask>() , 2usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_fdir_flex_mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_flex_mask ) ) . flow_type as
- * const _ as usize } , 0usize);
+ * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_flex_mask
+ ) , "::" , stringify ! ( flow_type ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_flex_mask ) ) . mask as *
- const _ as usize } , 2usize);
+ const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_flex_mask
+ ) , "::" , stringify ! ( mask ) ));
}
impl Clone for rte_eth_fdir_flex_mask {
fn clone(&self) -> Self { *self }
@@ -826,20 +992,32 @@ pub struct rte_eth_fdir_flex_conf {
}
#[test]
fn bindgen_test_layout_rte_eth_fdir_flex_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_fdir_flex_conf>() , 688usize);
- assert_eq! (::std::mem::align_of::<rte_eth_fdir_flex_conf>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_fdir_flex_conf>() , 688usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_eth_fdir_flex_conf )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_eth_fdir_flex_conf>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_eth_fdir_flex_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_flex_conf ) ) . nb_payloads
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_flex_conf
+ ) , "::" , stringify ! ( nb_payloads ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_flex_conf ) ) . nb_flexmasks
- as * const _ as usize } , 2usize);
+ as * const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_flex_conf
+ ) , "::" , stringify ! ( nb_flexmasks ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_flex_conf ) ) . flex_set as
- * const _ as usize } , 4usize);
+ * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_flex_conf
+ ) , "::" , stringify ! ( flex_set ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_fdir_flex_conf ) ) . flex_mask as
- * const _ as usize } , 292usize);
+ * const _ as usize } , 292usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_fdir_flex_conf
+ ) , "::" , stringify ! ( flex_mask ) ));
}
impl Clone for rte_eth_fdir_flex_conf {
fn clone(&self) -> Self { *self }
@@ -866,26 +1044,40 @@ pub struct rte_fdir_conf {
}
#[test]
fn bindgen_test_layout_rte_fdir_conf() {
- assert_eq!(::std::mem::size_of::<rte_fdir_conf>() , 772usize);
- assert_eq! (::std::mem::align_of::<rte_fdir_conf>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_fdir_conf>() , 772usize , concat ! (
+ "Size of: " , stringify ! ( rte_fdir_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_fdir_conf>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( rte_fdir_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_fdir_conf ) ) . mode as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_fdir_conf ) , "::"
+ , stringify ! ( mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_fdir_conf ) ) . pballoc as * const _
- as usize } , 4usize);
+ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_fdir_conf ) , "::"
+ , stringify ! ( pballoc ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_fdir_conf ) ) . status as * const _
- as usize } , 8usize);
+ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_fdir_conf ) , "::"
+ , stringify ! ( status ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_fdir_conf ) ) . drop_queue as * const
- _ as usize } , 12usize);
+ _ as usize } , 12usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_fdir_conf ) , "::"
+ , stringify ! ( drop_queue ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_fdir_conf ) ) . mask as * const _ as
- usize } , 16usize);
+ usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_fdir_conf ) , "::"
+ , stringify ! ( mask ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_fdir_conf ) ) . flex_conf as * const
- _ as usize } , 84usize);
+ _ as usize } , 84usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_fdir_conf ) , "::"
+ , stringify ! ( flex_conf ) ));
}
impl Clone for rte_fdir_conf {
fn clone(&self) -> Self { *self }
@@ -903,14 +1095,20 @@ pub struct rte_intr_conf {
}
#[test]
fn bindgen_test_layout_rte_intr_conf() {
- assert_eq!(::std::mem::size_of::<rte_intr_conf>() , 4usize);
- assert_eq! (::std::mem::align_of::<rte_intr_conf>() , 2usize);
+ assert_eq!(::std::mem::size_of::<rte_intr_conf>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( rte_intr_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_intr_conf>() , 2usize , concat ! (
+ "Alignment of " , stringify ! ( rte_intr_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_intr_conf ) ) . lsc as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_intr_conf ) , "::"
+ , stringify ! ( lsc ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_intr_conf ) ) . rxq as * const _ as
- usize } , 2usize);
+ usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_intr_conf ) , "::"
+ , stringify ! ( rxq ) ));
}
impl Clone for rte_intr_conf {
fn clone(&self) -> Self { *self }
@@ -962,22 +1160,37 @@ pub struct rte_eth_conf__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_rte_eth_conf__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_eth_conf__bindgen_ty_1>() ,
- 2120usize);
- assert_eq! (::std::mem::align_of::<rte_eth_conf__bindgen_ty_1>() ,
- 8usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_conf__bindgen_ty_1>() , 2120usize
+ , concat ! (
+ "Size of: " , stringify ! ( rte_eth_conf__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_conf__bindgen_ty_1>() , 8usize
+ , concat ! (
+ "Alignment of " , stringify ! ( rte_eth_conf__bindgen_ty_1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_1 ) ) . rss_conf
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_1 ) , "::" , stringify ! ( rss_conf )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_1 ) ) .
- vmdq_dcb_conf as * const _ as usize } , 24usize);
+ vmdq_dcb_conf as * const _ as usize } , 24usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ vmdq_dcb_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_1 ) ) .
- dcb_rx_conf as * const _ as usize } , 1064usize);
+ dcb_rx_conf as * const _ as usize } , 1064usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ dcb_rx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_1 ) ) .
- vmdq_rx_conf as * const _ as usize } , 1080usize);
+ vmdq_rx_conf as * const _ as usize } , 1080usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_1 ) , "::" , stringify ! (
+ vmdq_rx_conf ) ));
}
#[repr(C)]
#[derive(Debug, Copy)]
@@ -989,51 +1202,84 @@ pub struct rte_eth_conf__bindgen_ty_2 {
}
#[test]
fn bindgen_test_layout_rte_eth_conf__bindgen_ty_2() {
- assert_eq!(::std::mem::size_of::<rte_eth_conf__bindgen_ty_2>() , 12usize);
- assert_eq! (::std::mem::align_of::<rte_eth_conf__bindgen_ty_2>() ,
- 4usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_conf__bindgen_ty_2>() , 12usize ,
+ concat ! (
+ "Size of: " , stringify ! ( rte_eth_conf__bindgen_ty_2 ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_conf__bindgen_ty_2>() , 4usize
+ , concat ! (
+ "Alignment of " , stringify ! ( rte_eth_conf__bindgen_ty_2 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_2 ) ) .
- vmdq_dcb_tx_conf as * const _ as usize } , 0usize);
+ vmdq_dcb_tx_conf as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_2 ) , "::" , stringify ! (
+ vmdq_dcb_tx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_2 ) ) .
- dcb_tx_conf as * const _ as usize } , 0usize);
+ dcb_tx_conf as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_2 ) , "::" , stringify ! (
+ dcb_tx_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf__bindgen_ty_2 ) ) .
- vmdq_tx_conf as * const _ as usize } , 0usize);
+ vmdq_tx_conf as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_eth_conf__bindgen_ty_2 ) , "::" , stringify ! (
+ vmdq_tx_conf ) ));
}
impl Clone for rte_eth_conf__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_eth_conf() {
- assert_eq!(::std::mem::size_of::<rte_eth_conf>() , 2944usize);
- assert_eq! (::std::mem::align_of::<rte_eth_conf>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_eth_conf>() , 2944usize , concat ! (
+ "Size of: " , stringify ! ( rte_eth_conf ) ));
+ assert_eq! (::std::mem::align_of::<rte_eth_conf>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( rte_eth_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . link_speeds as * const
- _ as usize } , 0usize);
+ _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( link_speeds ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . rxmode as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( rxmode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . txmode as * const _ as
- usize } , 16usize);
+ usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( txmode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . lpbk_mode as * const _
- as usize } , 24usize);
+ as usize } , 24usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( lpbk_mode ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . rx_adv_conf as * const
- _ as usize } , 32usize);
+ _ as usize } , 32usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( rx_adv_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . tx_adv_conf as * const
- _ as usize } , 2152usize);
+ _ as usize } , 2152usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( tx_adv_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . dcb_capability_en as *
- const _ as usize } , 2164usize);
+ const _ as usize } , 2164usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( dcb_capability_en ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . fdir_conf as * const _
- as usize } , 2168usize);
+ as usize } , 2168usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( fdir_conf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_conf ) ) . intr_conf as * const _
- as usize } , 2940usize);
+ as usize } , 2940usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_eth_conf ) , "::" ,
+ stringify ! ( intr_conf ) ));
}
diff --git a/tests/expectations/tests/layout_kni_mbuf.rs b/tests/expectations/tests/layout_kni_mbuf.rs
index bdaf0845..e0e3579a 100644
--- a/tests/expectations/tests/layout_kni_mbuf.rs
+++ b/tests/expectations/tests/layout_kni_mbuf.rs
@@ -33,49 +33,78 @@ pub struct rte_kni_mbuf {
}
#[test]
fn bindgen_test_layout_rte_kni_mbuf() {
- assert_eq!(::std::mem::size_of::<rte_kni_mbuf>() , 128usize);
+ assert_eq!(::std::mem::size_of::<rte_kni_mbuf>() , 128usize , concat ! (
+ "Size of: " , stringify ! ( rte_kni_mbuf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . buf_addr as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( buf_addr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . buf_physaddr as *
- const _ as usize } , 8usize);
+ const _ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( buf_physaddr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pad0 as * const _ as
- usize } , 16usize);
+ usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pad0 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . data_off as * const _
- as usize } , 18usize);
+ as usize } , 18usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( data_off ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pad1 as * const _ as
- usize } , 20usize);
+ usize } , 20usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pad1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . nb_segs as * const _
- as usize } , 22usize);
+ as usize } , 22usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( nb_segs ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pad4 as * const _ as
- usize } , 23usize);
+ usize } , 23usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pad4 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . ol_flags as * const _
- as usize } , 24usize);
+ as usize } , 24usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( ol_flags ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pad2 as * const _ as
- usize } , 32usize);
+ usize } , 32usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pad2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pkt_len as * const _
- as usize } , 36usize);
+ as usize } , 36usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pkt_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . data_len as * const _
- as usize } , 40usize);
+ as usize } , 40usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( data_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pad3 as * const _ as
- usize } , 64usize);
+ usize } , 64usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pad3 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . pool as * const _ as
- usize } , 72usize);
+ usize } , 72usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( pool ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_kni_mbuf ) ) . next as * const _ as
- usize } , 80usize);
+ usize } , 80usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_kni_mbuf ) , "::" ,
+ stringify ! ( next ) ));
}
impl Clone for rte_kni_mbuf {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/layout_mbuf.rs b/tests/expectations/tests/layout_mbuf.rs
index 163a62ec..f1702673 100644
--- a/tests/expectations/tests/layout_mbuf.rs
+++ b/tests/expectations/tests/layout_mbuf.rs
@@ -45,11 +45,15 @@ pub struct _bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 2usize);
- assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 2usize);
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 2usize , concat ! (
+ "Size of: " , stringify ! ( _bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 2usize , concat ! (
+ "Alignment of " , stringify ! ( _bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) . cnt as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( cnt ) ));
}
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -124,14 +128,22 @@ pub struct rte_mbuf__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_1>() , 2usize);
- assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_1>() , 2usize);
+ assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_1>() , 2usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_mbuf__bindgen_ty_1 )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_1>() , 2usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_mbuf__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_1 ) ) .
- refcnt_atomic as * const _ as usize } , 0usize);
+ refcnt_atomic as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_1
+ ) , "::" , stringify ! ( refcnt_atomic ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_1 ) ) . refcnt as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_1
+ ) , "::" , stringify ! ( refcnt ) ));
}
impl Clone for rte_mbuf__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -152,9 +164,13 @@ pub struct rte_mbuf__bindgen_ty_2__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_2__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_2__bindgen_ty_1>() ,
- 4usize);
+ 4usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_mbuf__bindgen_ty_2__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_2__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_mbuf__bindgen_ty_2__bindgen_ty_1 ) ));
}
impl Clone for rte_mbuf__bindgen_ty_2__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -253,11 +269,17 @@ impl rte_mbuf__bindgen_ty_2__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_2() {
- assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_2>() , 4usize);
- assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_2>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_2>() , 4usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_mbuf__bindgen_ty_2 )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_2>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_mbuf__bindgen_ty_2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_2 ) ) . packet_type
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_2
+ ) , "::" , stringify ! ( packet_type ) ));
}
impl Clone for rte_mbuf__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
@@ -297,21 +319,33 @@ pub struct rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1
+ ) ));
assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>()
- , 2usize);
+ , 2usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1
+ ) ));
assert_eq! (unsafe {
& (
* (
0 as * const
rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1
- ) ) . hash as * const _ as usize } , 0usize);
+ ) ) . hash as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1
+ ) , "::" , stringify ! ( hash ) ));
assert_eq! (unsafe {
& (
* (
0 as * const
rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1
- ) ) . id as * const _ as usize } , 2usize);
+ ) ) . id as * const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1
+ ) , "::" , stringify ! ( id ) ));
}
impl Clone for
rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
@@ -320,15 +354,22 @@ impl Clone for
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& (
* (
0 as * const
rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 ) ) . lo as
- * const _ as usize } , 0usize);
+ * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 ) , "::" ,
+ stringify ! ( lo ) ));
}
impl Clone for rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -336,12 +377,19 @@ impl Clone for rte_mbuf__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_1>() ,
- 8usize);
+ 8usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_1>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3__bindgen_ty_1 ) )
- . hi as * const _ as usize } , 4usize);
+ . hi as * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_1 ) , "::" , stringify ! (
+ hi ) ));
}
impl Clone for rte_mbuf__bindgen_ty_3__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -355,35 +403,57 @@ pub struct rte_mbuf__bindgen_ty_3__bindgen_ty_2 {
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_3__bindgen_ty_2() {
assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_2>() ,
- 8usize);
+ 8usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_2 ) ));
assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_3__bindgen_ty_2>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3__bindgen_ty_2 ) )
- . lo as * const _ as usize } , 0usize);
+ . lo as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_2 ) , "::" , stringify ! (
+ lo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3__bindgen_ty_2 ) )
- . hi as * const _ as usize } , 4usize);
+ . hi as * const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ rte_mbuf__bindgen_ty_3__bindgen_ty_2 ) , "::" , stringify ! (
+ hi ) ));
}
impl Clone for rte_mbuf__bindgen_ty_3__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_3() {
- assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_3>() , 8usize);
- assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_3>() , 4usize);
+ assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_3>() , 8usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_mbuf__bindgen_ty_3 )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_3>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_mbuf__bindgen_ty_3 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3 ) ) . rss as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_3
+ ) , "::" , stringify ! ( rss ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3 ) ) . fdir as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_3
+ ) , "::" , stringify ! ( fdir ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3 ) ) . sched as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_3
+ ) , "::" , stringify ! ( sched ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_3 ) ) . usr as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_3
+ ) , "::" , stringify ! ( usr ) ));
}
impl Clone for rte_mbuf__bindgen_ty_3 {
fn clone(&self) -> Self { *self }
@@ -399,14 +469,22 @@ pub struct rte_mbuf__bindgen_ty_4 {
}
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_4() {
- assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_4>() , 8usize);
- assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_4>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_4>() , 8usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_mbuf__bindgen_ty_4 )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_4>() , 8usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_mbuf__bindgen_ty_4 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_4 ) ) . userdata as
- * const _ as usize } , 0usize);
+ * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_4
+ ) , "::" , stringify ! ( userdata ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_4 ) ) . udata64 as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_4
+ ) , "::" , stringify ! ( udata64 ) ));
}
impl Clone for rte_mbuf__bindgen_ty_4 {
fn clone(&self) -> Self { *self }
@@ -430,9 +508,13 @@ pub struct rte_mbuf__bindgen_ty_5__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_5__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_5__bindgen_ty_1>() ,
- 8usize);
+ 8usize , concat ! (
+ "Size of: " , stringify ! (
+ rte_mbuf__bindgen_ty_5__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_5__bindgen_ty_1>()
- , 8usize);
+ , 8usize , concat ! (
+ "Alignment of " , stringify ! (
+ rte_mbuf__bindgen_ty_5__bindgen_ty_1 ) ));
}
impl Clone for rte_mbuf__bindgen_ty_5__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -521,81 +603,130 @@ impl rte_mbuf__bindgen_ty_5__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_rte_mbuf__bindgen_ty_5() {
- assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_5>() , 8usize);
- assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_5>() , 8usize);
+ assert_eq!(::std::mem::size_of::<rte_mbuf__bindgen_ty_5>() , 8usize ,
+ concat ! ( "Size of: " , stringify ! ( rte_mbuf__bindgen_ty_5 )
+ ));
+ assert_eq! (::std::mem::align_of::<rte_mbuf__bindgen_ty_5>() , 8usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( rte_mbuf__bindgen_ty_5 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf__bindgen_ty_5 ) ) . tx_offload
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf__bindgen_ty_5
+ ) , "::" , stringify ! ( tx_offload ) ));
}
impl Clone for rte_mbuf__bindgen_ty_5 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_rte_mbuf() {
- assert_eq!(::std::mem::size_of::<rte_mbuf>() , 128usize);
+ assert_eq!(::std::mem::size_of::<rte_mbuf>() , 128usize , concat ! (
+ "Size of: " , stringify ! ( rte_mbuf ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . cacheline0 as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( cacheline0 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . buf_addr as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( buf_addr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . buf_physaddr as * const _
- as usize } , 8usize);
+ as usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( buf_physaddr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . buf_len as * const _ as
- usize } , 16usize);
+ usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( buf_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . rearm_data as * const _ as
- usize } , 18usize);
+ usize } , 18usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( rearm_data ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . data_off as * const _ as
- usize } , 18usize);
+ usize } , 18usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( data_off ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . nb_segs as * const _ as
- usize } , 22usize);
+ usize } , 22usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( nb_segs ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . port as * const _ as usize
- } , 23usize);
+ } , 23usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( port ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . ol_flags as * const _ as
- usize } , 24usize);
+ usize } , 24usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( ol_flags ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . rx_descriptor_fields1 as *
- const _ as usize } , 32usize);
+ const _ as usize } , 32usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( rx_descriptor_fields1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . pkt_len as * const _ as
- usize } , 36usize);
+ usize } , 36usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( pkt_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . data_len as * const _ as
- usize } , 40usize);
+ usize } , 40usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( data_len ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . vlan_tci as * const _ as
- usize } , 42usize);
+ usize } , 42usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( vlan_tci ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . hash as * const _ as usize
- } , 44usize);
+ } , 44usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( hash ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . seqn as * const _ as usize
- } , 52usize);
+ } , 52usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( seqn ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . vlan_tci_outer as * const
- _ as usize } , 56usize);
+ _ as usize } , 56usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( vlan_tci_outer ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . cacheline1 as * const _ as
- usize } , 64usize);
+ usize } , 64usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( cacheline1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . pool as * const _ as usize
- } , 72usize);
+ } , 72usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( pool ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . next as * const _ as usize
- } , 80usize);
+ } , 80usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( next ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . priv_size as * const _ as
- usize } , 96usize);
+ usize } , 96usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( priv_size ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_mbuf ) ) . timesync as * const _ as
- usize } , 98usize);
+ usize } , 98usize , concat ! (
+ "Alignment of field: " , stringify ! ( rte_mbuf ) , "::" ,
+ stringify ! ( timesync ) ));
}
impl Clone for rte_mbuf {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/method-mangling.rs b/tests/expectations/tests/method-mangling.rs
index 99a6e9b8..94877dca 100644
--- a/tests/expectations/tests/method-mangling.rs
+++ b/tests/expectations/tests/method-mangling.rs
@@ -11,8 +11,10 @@ pub struct Foo {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
}
extern "C" {
#[link_name = "_ZN3Foo4typeEv"]
diff --git a/tests/expectations/tests/module-whitelisted.rs b/tests/expectations/tests/module-whitelisted.rs
index 9cf4b051..cee91305 100644
--- a/tests/expectations/tests/module-whitelisted.rs
+++ b/tests/expectations/tests/module-whitelisted.rs
@@ -14,8 +14,10 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Test() {
- assert_eq!(::std::mem::size_of::<Test>() , 1usize);
- assert_eq! (::std::mem::align_of::<Test>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Test>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Test ) ));
+ assert_eq! (::std::mem::align_of::<Test>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Test ) ));
}
impl Clone for Test {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/msvc-no-usr.rs b/tests/expectations/tests/msvc-no-usr.rs
index e2f9a319..842ca1f3 100644
--- a/tests/expectations/tests/msvc-no-usr.rs
+++ b/tests/expectations/tests/msvc-no-usr.rs
@@ -11,11 +11,15 @@ pub struct A {
}
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 8usize);
- assert_eq! (::std::mem::align_of::<A>() , 8usize);
+ assert_eq!(::std::mem::size_of::<A>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A ) ) . foo as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A ) , "::" , stringify
+ ! ( foo ) ));
}
impl Clone for A {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/multiple-inherit-empty-correct-layout.rs b/tests/expectations/tests/multiple-inherit-empty-correct-layout.rs
index 45537eef..008ed565 100644
--- a/tests/expectations/tests/multiple-inherit-empty-correct-layout.rs
+++ b/tests/expectations/tests/multiple-inherit-empty-correct-layout.rs
@@ -11,8 +11,10 @@ pub struct Foo {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 1usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
@@ -24,8 +26,10 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 1usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
@@ -37,8 +41,10 @@ pub struct Baz {
}
#[test]
fn bindgen_test_layout_Baz() {
- assert_eq!(::std::mem::size_of::<Baz>() , 1usize);
- assert_eq! (::std::mem::align_of::<Baz>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Baz>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Baz ) ));
+ assert_eq! (::std::mem::align_of::<Baz>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Baz ) ));
}
impl Clone for Baz {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/mutable.rs b/tests/expectations/tests/mutable.rs
index 01ef8e8b..82689ce1 100644
--- a/tests/expectations/tests/mutable.rs
+++ b/tests/expectations/tests/mutable.rs
@@ -12,14 +12,20 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 8usize);
- assert_eq! (::std::mem::align_of::<C>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . m_member as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( m_member ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . m_other as * const _ as usize } ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( m_other ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
@@ -31,11 +37,15 @@ pub struct NonCopiable {
}
#[test]
fn bindgen_test_layout_NonCopiable() {
- assert_eq!(::std::mem::size_of::<NonCopiable>() , 4usize);
- assert_eq! (::std::mem::align_of::<NonCopiable>() , 4usize);
+ assert_eq!(::std::mem::size_of::<NonCopiable>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( NonCopiable ) ));
+ assert_eq! (::std::mem::align_of::<NonCopiable>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( NonCopiable ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const NonCopiable ) ) . m_member as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( NonCopiable ) , "::" ,
+ stringify ! ( m_member ) ));
}
#[repr(C)]
#[derive(Debug)]
@@ -45,10 +55,17 @@ pub struct NonCopiableWithNonCopiableMutableMember {
#[test]
fn bindgen_test_layout_NonCopiableWithNonCopiableMutableMember() {
assert_eq!(::std::mem::size_of::<NonCopiableWithNonCopiableMutableMember>()
- , 4usize);
+ , 4usize , concat ! (
+ "Size of: " , stringify ! (
+ NonCopiableWithNonCopiableMutableMember ) ));
assert_eq! (::std::mem::align_of::<NonCopiableWithNonCopiableMutableMember>()
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of " , stringify ! (
+ NonCopiableWithNonCopiableMutableMember ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const NonCopiableWithNonCopiableMutableMember )
- ) . m_member as * const _ as usize } , 0usize);
+ ) . m_member as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ NonCopiableWithNonCopiableMutableMember ) , "::" , stringify !
+ ( m_member ) ));
}
diff --git a/tests/expectations/tests/namespace.rs b/tests/expectations/tests/namespace.rs
index 4958b519..4d27385d 100644
--- a/tests/expectations/tests/namespace.rs
+++ b/tests/expectations/tests/namespace.rs
@@ -34,11 +34,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 4usize);
- assert_eq! (::std::mem::align_of::<A>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A ) ) . b as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A ) , "::" ,
+ stringify ! ( b ) ));
}
extern "C" {
#[link_name = "_ZN12_GLOBAL__N_11A20lets_hope_this_worksEv"]
diff --git a/tests/expectations/tests/nested.rs b/tests/expectations/tests/nested.rs
index 5b9ce5a6..4c119bc7 100644
--- a/tests/expectations/tests/nested.rs
+++ b/tests/expectations/tests/nested.rs
@@ -11,11 +11,15 @@ pub struct Calc {
}
#[test]
fn bindgen_test_layout_Calc() {
- assert_eq!(::std::mem::size_of::<Calc>() , 4usize);
- assert_eq! (::std::mem::align_of::<Calc>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Calc>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Calc ) ));
+ assert_eq! (::std::mem::align_of::<Calc>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Calc ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Calc ) ) . w as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Calc ) , "::" ,
+ stringify ! ( w ) ));
}
impl Clone for Calc {
fn clone(&self) -> Self { *self }
@@ -38,30 +42,41 @@ pub struct Test_Size_Dimension {
}
#[test]
fn bindgen_test_layout_Test_Size_Dimension() {
- assert_eq!(::std::mem::size_of::<Test_Size_Dimension>() , 4usize);
- assert_eq! (::std::mem::align_of::<Test_Size_Dimension>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Test_Size_Dimension>() , 4usize , concat
+ ! ( "Size of: " , stringify ! ( Test_Size_Dimension ) ));
+ assert_eq! (::std::mem::align_of::<Test_Size_Dimension>() , 4usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( Test_Size_Dimension ) ));
}
impl Clone for Test_Size_Dimension {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Test_Size() {
- assert_eq!(::std::mem::size_of::<Test_Size>() , 8usize);
- assert_eq! (::std::mem::align_of::<Test_Size>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Test_Size>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Test_Size ) ));
+ assert_eq! (::std::mem::align_of::<Test_Size>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Test_Size ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Test_Size ) ) . mWidth as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Test_Size ) , "::" ,
+ stringify ! ( mWidth ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Test_Size ) ) . mHeight as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( Test_Size ) , "::" ,
+ stringify ! ( mHeight ) ));
}
impl Clone for Test_Size {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Test() {
- assert_eq!(::std::mem::size_of::<Test>() , 1usize);
- assert_eq! (::std::mem::align_of::<Test>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Test>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Test ) ));
+ assert_eq! (::std::mem::align_of::<Test>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Test ) ));
}
impl Clone for Test {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/nested_vtable.rs b/tests/expectations/tests/nested_vtable.rs
index e0d81d18..7cc30423 100644
--- a/tests/expectations/tests/nested_vtable.rs
+++ b/tests/expectations/tests/nested_vtable.rs
@@ -14,8 +14,10 @@ pub struct nsISupports {
}
#[test]
fn bindgen_test_layout_nsISupports() {
- assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize);
- assert_eq! (::std::mem::align_of::<nsISupports>() , 8usize);
+ assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( nsISupports ) ));
+ assert_eq! (::std::mem::align_of::<nsISupports>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( nsISupports ) ));
}
impl Clone for nsISupports {
fn clone(&self) -> Self { *self }
@@ -27,8 +29,10 @@ pub struct nsIRunnable {
}
#[test]
fn bindgen_test_layout_nsIRunnable() {
- assert_eq!(::std::mem::size_of::<nsIRunnable>() , 8usize);
- assert_eq! (::std::mem::align_of::<nsIRunnable>() , 8usize);
+ assert_eq!(::std::mem::size_of::<nsIRunnable>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( nsIRunnable ) ));
+ assert_eq! (::std::mem::align_of::<nsIRunnable>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( nsIRunnable ) ));
}
impl Clone for nsIRunnable {
fn clone(&self) -> Self { *self }
@@ -40,8 +44,10 @@ pub struct Runnable {
}
#[test]
fn bindgen_test_layout_Runnable() {
- assert_eq!(::std::mem::size_of::<Runnable>() , 8usize);
- assert_eq! (::std::mem::align_of::<Runnable>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Runnable>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Runnable ) ));
+ assert_eq! (::std::mem::align_of::<Runnable>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Runnable ) ));
}
impl Clone for Runnable {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/nested_within_namespace.rs b/tests/expectations/tests/nested_within_namespace.rs
index 355ab100..db4e0493 100644
--- a/tests/expectations/tests/nested_within_namespace.rs
+++ b/tests/expectations/tests/nested_within_namespace.rs
@@ -22,22 +22,30 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Bar_Baz() {
- assert_eq!(::std::mem::size_of::<Bar_Baz>() , 4usize);
- assert_eq! (::std::mem::align_of::<Bar_Baz>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar_Baz>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Bar_Baz ) ));
+ assert_eq! (::std::mem::align_of::<Bar_Baz>() , 4usize , concat !
+ ( "Alignment of " , stringify ! ( Bar_Baz ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar_Baz ) ) . foo as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar_Baz ) ,
+ "::" , stringify ! ( foo ) ));
}
impl Clone for Bar_Baz {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . foo as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( foo ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
@@ -49,11 +57,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Baz() {
- assert_eq!(::std::mem::size_of::<Baz>() , 4usize);
- assert_eq! (::std::mem::align_of::<Baz>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Baz>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Baz ) ));
+ assert_eq! (::std::mem::align_of::<Baz>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Baz ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Baz ) ) . baz as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Baz ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for Baz {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/no-comments.rs b/tests/expectations/tests/no-comments.rs
index 947ed590..c3bb13c4 100644
--- a/tests/expectations/tests/no-comments.rs
+++ b/tests/expectations/tests/no-comments.rs
@@ -11,11 +11,15 @@ pub struct Foo {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Foo ) ) . s as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Foo ) , "::" ,
+ stringify ! ( s ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/no-derive-debug.rs b/tests/expectations/tests/no-derive-debug.rs
index 9c35f78e..4de75797 100644
--- a/tests/expectations/tests/no-derive-debug.rs
+++ b/tests/expectations/tests/no-derive-debug.rs
@@ -18,14 +18,20 @@ pub struct bar {
}
#[test]
fn bindgen_test_layout_bar() {
- assert_eq!(::std::mem::size_of::<bar>() , 8usize);
- assert_eq! (::std::mem::align_of::<bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<bar>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( bar ) ));
+ assert_eq! (::std::mem::align_of::<bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const bar ) ) . foo as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( bar ) , "::" ,
+ stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const bar ) ) . baz as * const _ as usize } ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( bar ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/no-recursive-whitelisting.rs b/tests/expectations/tests/no-recursive-whitelisting.rs
index 24909019..c8341990 100644
--- a/tests/expectations/tests/no-recursive-whitelisting.rs
+++ b/tests/expectations/tests/no-recursive-whitelisting.rs
@@ -12,11 +12,15 @@ pub struct Foo {
}
#[test]
fn bindgen_test_layout_Foo() {
- assert_eq!(::std::mem::size_of::<Foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<Foo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Foo ) ));
+ assert_eq! (::std::mem::align_of::<Foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Foo ) ) . baz as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Foo ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for Foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/no-std.rs b/tests/expectations/tests/no-std.rs
index 110255ad..21cfda00 100644
--- a/tests/expectations/tests/no-std.rs
+++ b/tests/expectations/tests/no-std.rs
@@ -15,17 +15,25 @@ pub struct foo {
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::core::mem::size_of::<foo>() , 16usize);
- assert_eq! (::core::mem::align_of::<foo>() , 8usize);
+ assert_eq!(::core::mem::size_of::<foo>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::core::mem::align_of::<foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . b as * const _ as usize } ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( b ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/objc_interface_type.rs b/tests/expectations/tests/objc_interface_type.rs
index 1730f824..544ced07 100644
--- a/tests/expectations/tests/objc_interface_type.rs
+++ b/tests/expectations/tests/objc_interface_type.rs
@@ -18,11 +18,15 @@ pub struct FooStruct {
}
#[test]
fn bindgen_test_layout_FooStruct() {
- assert_eq!(::std::mem::size_of::<FooStruct>() , 8usize);
- assert_eq! (::std::mem::align_of::<FooStruct>() , 8usize);
+ assert_eq!(::std::mem::size_of::<FooStruct>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( FooStruct ) ));
+ assert_eq! (::std::mem::align_of::<FooStruct>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( FooStruct ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const FooStruct ) ) . foo as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( FooStruct ) , "::" ,
+ stringify ! ( foo ) ));
}
impl Clone for FooStruct {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/only_bitfields.rs b/tests/expectations/tests/only_bitfields.rs
index 97363a87..7811584b 100644
--- a/tests/expectations/tests/only_bitfields.rs
+++ b/tests/expectations/tests/only_bitfields.rs
@@ -11,8 +11,10 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 1usize);
- assert_eq! (::std::mem::align_of::<C>() , 1usize);
+ assert_eq!(::std::mem::size_of::<C>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/opaque-tracing.rs b/tests/expectations/tests/opaque-tracing.rs
index 86e01665..b19a1e68 100644
--- a/tests/expectations/tests/opaque-tracing.rs
+++ b/tests/expectations/tests/opaque-tracing.rs
@@ -11,8 +11,10 @@ pub struct Container {
}
#[test]
fn bindgen_test_layout_Container() {
- assert_eq!(::std::mem::size_of::<Container>() , 8usize);
- assert_eq! (::std::mem::align_of::<Container>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Container>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Container ) ));
+ assert_eq! (::std::mem::align_of::<Container>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Container ) ));
}
impl Clone for Container {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/opaque_in_struct.rs b/tests/expectations/tests/opaque_in_struct.rs
index 427692fd..cba5952e 100644
--- a/tests/expectations/tests/opaque_in_struct.rs
+++ b/tests/expectations/tests/opaque_in_struct.rs
@@ -12,8 +12,10 @@ pub struct opaque {
}
#[test]
fn bindgen_test_layout_opaque() {
- assert_eq!(::std::mem::size_of::<opaque>() , 4usize);
- assert_eq! (::std::mem::align_of::<opaque>() , 4usize);
+ assert_eq!(::std::mem::size_of::<opaque>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( opaque ) ));
+ assert_eq! (::std::mem::align_of::<opaque>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( opaque ) ));
}
impl Clone for opaque {
fn clone(&self) -> Self { *self }
@@ -25,11 +27,15 @@ pub struct container {
}
#[test]
fn bindgen_test_layout_container() {
- assert_eq!(::std::mem::size_of::<container>() , 4usize);
- assert_eq! (::std::mem::align_of::<container>() , 4usize);
+ assert_eq!(::std::mem::size_of::<container>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( container ) ));
+ assert_eq! (::std::mem::align_of::<container>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( container ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const container ) ) . contained as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( container ) , "::" ,
+ stringify ! ( contained ) ));
}
impl Clone for container {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/opaque_pointer.rs b/tests/expectations/tests/opaque_pointer.rs
index 0dee14df..3cfa6d87 100644
--- a/tests/expectations/tests/opaque_pointer.rs
+++ b/tests/expectations/tests/opaque_pointer.rs
@@ -14,8 +14,10 @@ pub struct OtherOpaque {
}
#[test]
fn bindgen_test_layout_OtherOpaque() {
- assert_eq!(::std::mem::size_of::<OtherOpaque>() , 4usize);
- assert_eq! (::std::mem::align_of::<OtherOpaque>() , 4usize);
+ assert_eq!(::std::mem::size_of::<OtherOpaque>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( OtherOpaque ) ));
+ assert_eq! (::std::mem::align_of::<OtherOpaque>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( OtherOpaque ) ));
}
impl Clone for OtherOpaque {
fn clone(&self) -> Self { *self }
@@ -37,17 +39,25 @@ pub struct WithOpaquePtr {
}
#[test]
fn bindgen_test_layout_WithOpaquePtr() {
- assert_eq!(::std::mem::size_of::<WithOpaquePtr>() , 16usize);
- assert_eq! (::std::mem::align_of::<WithOpaquePtr>() , 8usize);
+ assert_eq!(::std::mem::size_of::<WithOpaquePtr>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( WithOpaquePtr ) ));
+ assert_eq! (::std::mem::align_of::<WithOpaquePtr>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( WithOpaquePtr ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithOpaquePtr ) ) . whatever as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithOpaquePtr ) , "::"
+ , stringify ! ( whatever ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithOpaquePtr ) ) . other as * const _ as
- usize } , 8usize);
+ usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithOpaquePtr ) , "::"
+ , stringify ! ( other ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithOpaquePtr ) ) . t as * const _ as
- usize } , 12usize);
+ usize } , 12usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithOpaquePtr ) , "::"
+ , stringify ! ( t ) ));
}
impl Clone for WithOpaquePtr {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/private.rs b/tests/expectations/tests/private.rs
index 1379aa61..809e224a 100644
--- a/tests/expectations/tests/private.rs
+++ b/tests/expectations/tests/private.rs
@@ -13,14 +13,20 @@ pub struct HasPrivate {
}
#[test]
fn bindgen_test_layout_HasPrivate() {
- assert_eq!(::std::mem::size_of::<HasPrivate>() , 8usize);
- assert_eq! (::std::mem::align_of::<HasPrivate>() , 4usize);
+ assert_eq!(::std::mem::size_of::<HasPrivate>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( HasPrivate ) ));
+ assert_eq! (::std::mem::align_of::<HasPrivate>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( HasPrivate ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const HasPrivate ) ) . mNotPrivate as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( HasPrivate ) , "::" ,
+ stringify ! ( mNotPrivate ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const HasPrivate ) ) . mIsPrivate as * const _
- as usize } , 4usize);
+ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( HasPrivate ) , "::" ,
+ stringify ! ( mIsPrivate ) ));
}
impl Clone for HasPrivate {
fn clone(&self) -> Self { *self }
@@ -34,14 +40,20 @@ pub struct VeryPrivate {
}
#[test]
fn bindgen_test_layout_VeryPrivate() {
- assert_eq!(::std::mem::size_of::<VeryPrivate>() , 8usize);
- assert_eq! (::std::mem::align_of::<VeryPrivate>() , 4usize);
+ assert_eq!(::std::mem::size_of::<VeryPrivate>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( VeryPrivate ) ));
+ assert_eq! (::std::mem::align_of::<VeryPrivate>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( VeryPrivate ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const VeryPrivate ) ) . mIsPrivate as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( VeryPrivate ) , "::" ,
+ stringify ! ( mIsPrivate ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const VeryPrivate ) ) . mIsAlsoPrivate as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( VeryPrivate ) , "::" ,
+ stringify ! ( mIsAlsoPrivate ) ));
}
impl Clone for VeryPrivate {
fn clone(&self) -> Self { *self }
@@ -56,14 +68,20 @@ pub struct ContradictPrivate {
}
#[test]
fn bindgen_test_layout_ContradictPrivate() {
- assert_eq!(::std::mem::size_of::<ContradictPrivate>() , 8usize);
- assert_eq! (::std::mem::align_of::<ContradictPrivate>() , 4usize);
+ assert_eq!(::std::mem::size_of::<ContradictPrivate>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( ContradictPrivate ) ));
+ assert_eq! (::std::mem::align_of::<ContradictPrivate>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( ContradictPrivate ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ContradictPrivate ) ) . mNotPrivate as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( ContradictPrivate ) ,
+ "::" , stringify ! ( mNotPrivate ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ContradictPrivate ) ) . mIsPrivate as *
- const _ as usize } , 4usize);
+ const _ as usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( ContradictPrivate ) ,
+ "::" , stringify ! ( mIsPrivate ) ));
}
impl Clone for ContradictPrivate {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/public-dtor.rs b/tests/expectations/tests/public-dtor.rs
index ce05f173..d4c18c6b 100644
--- a/tests/expectations/tests/public-dtor.rs
+++ b/tests/expectations/tests/public-dtor.rs
@@ -11,6 +11,8 @@ pub struct cv_String {
}
#[test]
fn bindgen_test_layout_cv_String() {
- assert_eq!(::std::mem::size_of::<cv_String>() , 1usize);
- assert_eq! (::std::mem::align_of::<cv_String>() , 1usize);
+ assert_eq!(::std::mem::size_of::<cv_String>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( cv_String ) ));
+ assert_eq! (::std::mem::align_of::<cv_String>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( cv_String ) ));
}
diff --git a/tests/expectations/tests/ref_argument_array.rs b/tests/expectations/tests/ref_argument_array.rs
index 28c8c00d..675bbbca 100644
--- a/tests/expectations/tests/ref_argument_array.rs
+++ b/tests/expectations/tests/ref_argument_array.rs
@@ -15,8 +15,10 @@ pub struct nsID {
}
#[test]
fn bindgen_test_layout_nsID() {
- assert_eq!(::std::mem::size_of::<nsID>() , 8usize);
- assert_eq! (::std::mem::align_of::<nsID>() , 8usize);
+ assert_eq!(::std::mem::size_of::<nsID>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( nsID ) ));
+ assert_eq! (::std::mem::align_of::<nsID>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( nsID ) ));
}
impl Clone for nsID {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/reparented_replacement.rs b/tests/expectations/tests/reparented_replacement.rs
index 72fc8563..baeab03e 100644
--- a/tests/expectations/tests/reparented_replacement.rs
+++ b/tests/expectations/tests/reparented_replacement.rs
@@ -18,11 +18,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . bazz as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( bazz ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/replace_use.rs b/tests/expectations/tests/replace_use.rs
index 201ec2fd..ed55080a 100644
--- a/tests/expectations/tests/replace_use.rs
+++ b/tests/expectations/tests/replace_use.rs
@@ -20,11 +20,15 @@ pub struct Test {
}
#[test]
fn bindgen_test_layout_Test() {
- assert_eq!(::std::mem::size_of::<Test>() , 4usize);
- assert_eq! (::std::mem::align_of::<Test>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Test>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Test ) ));
+ assert_eq! (::std::mem::align_of::<Test>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Test ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Test ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Test ) , "::" ,
+ stringify ! ( a ) ));
}
impl Clone for Test {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/same_struct_name_in_different_namespaces.rs b/tests/expectations/tests/same_struct_name_in_different_namespaces.rs
index 859284d1..4dde8266 100644
--- a/tests/expectations/tests/same_struct_name_in_different_namespaces.rs
+++ b/tests/expectations/tests/same_struct_name_in_different_namespaces.rs
@@ -15,14 +15,20 @@ pub struct JS_shadow_Zone {
}
#[test]
fn bindgen_test_layout_JS_shadow_Zone() {
- assert_eq!(::std::mem::size_of::<JS_shadow_Zone>() , 8usize);
- assert_eq! (::std::mem::align_of::<JS_shadow_Zone>() , 4usize);
+ assert_eq!(::std::mem::size_of::<JS_shadow_Zone>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( JS_shadow_Zone ) ));
+ assert_eq! (::std::mem::align_of::<JS_shadow_Zone>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( JS_shadow_Zone ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const JS_shadow_Zone ) ) . x as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( JS_shadow_Zone ) , "::"
+ , stringify ! ( x ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const JS_shadow_Zone ) ) . y as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( JS_shadow_Zone ) , "::"
+ , stringify ! ( y ) ));
}
impl Clone for JS_shadow_Zone {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/size_t_template.rs b/tests/expectations/tests/size_t_template.rs
index 66868178..87df768d 100644
--- a/tests/expectations/tests/size_t_template.rs
+++ b/tests/expectations/tests/size_t_template.rs
@@ -11,11 +11,15 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 12usize);
- assert_eq! (::std::mem::align_of::<C>() , 4usize);
+ assert_eq!(::std::mem::size_of::<C>() , 12usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . arr as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( arr ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_containing_forward_declared_struct.rs b/tests/expectations/tests/struct_containing_forward_declared_struct.rs
index d0b139d4..60f12262 100644
--- a/tests/expectations/tests/struct_containing_forward_declared_struct.rs
+++ b/tests/expectations/tests/struct_containing_forward_declared_struct.rs
@@ -16,22 +16,30 @@ pub struct a_b {
}
#[test]
fn bindgen_test_layout_a_b() {
- assert_eq!(::std::mem::size_of::<a_b>() , 4usize);
- assert_eq! (::std::mem::align_of::<a_b>() , 4usize);
+ assert_eq!(::std::mem::size_of::<a_b>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( a_b ) ));
+ assert_eq! (::std::mem::align_of::<a_b>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( a_b ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const a_b ) ) . val_b as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( a_b ) , "::" ,
+ stringify ! ( val_b ) ));
}
impl Clone for a_b {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_a() {
- assert_eq!(::std::mem::size_of::<a>() , 8usize);
- assert_eq! (::std::mem::align_of::<a>() , 8usize);
+ assert_eq!(::std::mem::size_of::<a>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( a ) ));
+ assert_eq! (::std::mem::align_of::<a>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const a ) ) . val_a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( a ) , "::" , stringify
+ ! ( val_a ) ));
}
impl Clone for a {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_anon_struct.rs b/tests/expectations/tests/struct_with_anon_struct.rs
index b617fb29..75baf354 100644
--- a/tests/expectations/tests/struct_with_anon_struct.rs
+++ b/tests/expectations/tests/struct_with_anon_struct.rs
@@ -17,25 +17,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_anon_struct_array.rs b/tests/expectations/tests/struct_with_anon_struct_array.rs
index 4235c14b..f20f03d8 100644
--- a/tests/expectations/tests/struct_with_anon_struct_array.rs
+++ b/tests/expectations/tests/struct_with_anon_struct_array.rs
@@ -18,14 +18,20 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -38,28 +44,40 @@ pub struct foo__bindgen_ty_2 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_2() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_2>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_2>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_2>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_2 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_2>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_2 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_2 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_2 ) ) . b as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_2 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 208usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 208usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . baz as * const _ as usize } ,
- 16usize);
+ 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_anon_struct_pointer.rs b/tests/expectations/tests/struct_with_anon_struct_pointer.rs
index 5ffc9755..087ff3d8 100644
--- a/tests/expectations/tests/struct_with_anon_struct_pointer.rs
+++ b/tests/expectations/tests/struct_with_anon_struct_pointer.rs
@@ -17,25 +17,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_anon_union.rs b/tests/expectations/tests/struct_with_anon_union.rs
index 02ccb8b1..ac4b6f75 100644
--- a/tests/expectations/tests/struct_with_anon_union.rs
+++ b/tests/expectations/tests/struct_with_anon_union.rs
@@ -42,25 +42,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_anon_unnamed_struct.rs b/tests/expectations/tests/struct_with_anon_unnamed_struct.rs
index 224b711f..982b3bdc 100644
--- a/tests/expectations/tests/struct_with_anon_unnamed_struct.rs
+++ b/tests/expectations/tests/struct_with_anon_unnamed_struct.rs
@@ -17,22 +17,30 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_anon_unnamed_union.rs b/tests/expectations/tests/struct_with_anon_unnamed_union.rs
index e8beffd7..26edbceb 100644
--- a/tests/expectations/tests/struct_with_anon_unnamed_union.rs
+++ b/tests/expectations/tests/struct_with_anon_unnamed_union.rs
@@ -42,22 +42,30 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_bitfields.rs b/tests/expectations/tests/struct_with_bitfields.rs
index 11fa2d68..90f2fba2 100644
--- a/tests/expectations/tests/struct_with_bitfields.rs
+++ b/tests/expectations/tests/struct_with_bitfields.rs
@@ -14,11 +14,15 @@ pub struct bitfield {
}
#[test]
fn bindgen_test_layout_bitfield() {
- assert_eq!(::std::mem::size_of::<bitfield>() , 16usize);
- assert_eq! (::std::mem::align_of::<bitfield>() , 4usize);
+ assert_eq!(::std::mem::size_of::<bitfield>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( bitfield ) ));
+ assert_eq! (::std::mem::align_of::<bitfield>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( bitfield ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const bitfield ) ) . e as * const _ as usize }
- , 4usize);
+ , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( bitfield ) , "::" ,
+ stringify ! ( e ) ));
}
impl Clone for bitfield {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_derive_debug.rs b/tests/expectations/tests/struct_with_derive_debug.rs
index f34c67f4..b81baa00 100644
--- a/tests/expectations/tests/struct_with_derive_debug.rs
+++ b/tests/expectations/tests/struct_with_derive_debug.rs
@@ -11,11 +11,15 @@ pub struct LittleArray {
}
#[test]
fn bindgen_test_layout_LittleArray() {
- assert_eq!(::std::mem::size_of::<LittleArray>() , 128usize);
- assert_eq! (::std::mem::align_of::<LittleArray>() , 4usize);
+ assert_eq!(::std::mem::size_of::<LittleArray>() , 128usize , concat ! (
+ "Size of: " , stringify ! ( LittleArray ) ));
+ assert_eq! (::std::mem::align_of::<LittleArray>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( LittleArray ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const LittleArray ) ) . a as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( LittleArray ) , "::" ,
+ stringify ! ( a ) ));
}
impl Clone for LittleArray {
fn clone(&self) -> Self { *self }
@@ -26,11 +30,15 @@ pub struct BigArray {
}
#[test]
fn bindgen_test_layout_BigArray() {
- assert_eq!(::std::mem::size_of::<BigArray>() , 132usize);
- assert_eq! (::std::mem::align_of::<BigArray>() , 4usize);
+ assert_eq!(::std::mem::size_of::<BigArray>() , 132usize , concat ! (
+ "Size of: " , stringify ! ( BigArray ) ));
+ assert_eq! (::std::mem::align_of::<BigArray>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( BigArray ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const BigArray ) ) . a as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( BigArray ) , "::" ,
+ stringify ! ( a ) ));
}
#[repr(C)]
#[derive(Debug, Copy)]
@@ -39,11 +47,15 @@ pub struct WithLittleArray {
}
#[test]
fn bindgen_test_layout_WithLittleArray() {
- assert_eq!(::std::mem::size_of::<WithLittleArray>() , 128usize);
- assert_eq! (::std::mem::align_of::<WithLittleArray>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithLittleArray>() , 128usize , concat !
+ ( "Size of: " , stringify ! ( WithLittleArray ) ));
+ assert_eq! (::std::mem::align_of::<WithLittleArray>() , 4usize , concat !
+ ( "Alignment of " , stringify ! ( WithLittleArray ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithLittleArray ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithLittleArray ) ,
+ "::" , stringify ! ( a ) ));
}
impl Clone for WithLittleArray {
fn clone(&self) -> Self { *self }
@@ -54,9 +66,13 @@ pub struct WithBigArray {
}
#[test]
fn bindgen_test_layout_WithBigArray() {
- assert_eq!(::std::mem::size_of::<WithBigArray>() , 132usize);
- assert_eq! (::std::mem::align_of::<WithBigArray>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithBigArray>() , 132usize , concat ! (
+ "Size of: " , stringify ! ( WithBigArray ) ));
+ assert_eq! (::std::mem::align_of::<WithBigArray>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( WithBigArray ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigArray ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigArray ) , "::" ,
+ stringify ! ( a ) ));
}
diff --git a/tests/expectations/tests/struct_with_nesting.rs b/tests/expectations/tests/struct_with_nesting.rs
index e69268d6..4bd5586b 100644
--- a/tests/expectations/tests/struct_with_nesting.rs
+++ b/tests/expectations/tests/struct_with_nesting.rs
@@ -51,15 +51,25 @@ pub struct foo__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1__bindgen_ty_1>() ,
- 4usize);
+ 4usize , concat ! (
+ "Size of: " , stringify ! ( foo__bindgen_ty_1__bindgen_ty_1 )
+ ));
assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1__bindgen_ty_1>() ,
- 2usize);
+ 2usize , concat ! (
+ "Alignment of " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_1 ) ) . c1
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( c1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_1 ) ) . c2
- as * const _ as usize } , 2usize);
+ as * const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( c2 )
+ ));
}
impl Clone for foo__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -75,43 +85,67 @@ pub struct foo__bindgen_ty_1__bindgen_ty_2 {
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1__bindgen_ty_2>() ,
- 4usize);
+ 4usize , concat ! (
+ "Size of: " , stringify ! ( foo__bindgen_ty_1__bindgen_ty_2 )
+ ));
assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1__bindgen_ty_2>() ,
- 1usize);
+ 1usize , concat ! (
+ "Alignment of " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_2 ) ) . d1
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( d1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_2 ) ) . d2
- as * const _ as usize } , 1usize);
+ as * const _ as usize } , 1usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( d2 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_2 ) ) . d3
- as * const _ as usize } , 2usize);
+ as * const _ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( d3 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_2 ) ) . d4
- as * const _ as usize } , 3usize);
+ as * const _ as usize } , 3usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( d4 )
+ ));
}
impl Clone for foo__bindgen_ty_1__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( a ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_packing.rs b/tests/expectations/tests/struct_with_packing.rs
index 51ff7024..b7afdafe 100644
--- a/tests/expectations/tests/struct_with_packing.rs
+++ b/tests/expectations/tests/struct_with_packing.rs
@@ -12,12 +12,18 @@ pub struct a {
}
#[test]
fn bindgen_test_layout_a() {
- assert_eq!(::std::mem::size_of::<a>() , 3usize);
- assert_eq! (::std::mem::align_of::<a>() , 1usize);
+ assert_eq!(::std::mem::size_of::<a>() , 3usize , concat ! (
+ "Size of: " , stringify ! ( a ) ));
+ assert_eq! (::std::mem::align_of::<a>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( a ) ));
assert_eq! (unsafe { & ( * ( 0 as * const a ) ) . b as * const _ as usize
- } , 0usize);
+ } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( a ) , "::" , stringify
+ ! ( b ) ));
assert_eq! (unsafe { & ( * ( 0 as * const a ) ) . c as * const _ as usize
- } , 1usize);
+ } , 1usize , concat ! (
+ "Alignment of field: " , stringify ! ( a ) , "::" , stringify
+ ! ( c ) ));
}
impl Clone for a {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/struct_with_struct.rs b/tests/expectations/tests/struct_with_struct.rs
index cae2d677..d28806c4 100644
--- a/tests/expectations/tests/struct_with_struct.rs
+++ b/tests/expectations/tests/struct_with_struct.rs
@@ -17,25 +17,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . x as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( x ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . y as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( y ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/template.rs b/tests/expectations/tests/template.rs
index 80045142..844dc6c2 100644
--- a/tests/expectations/tests/template.rs
+++ b/tests/expectations/tests/template.rs
@@ -44,11 +44,15 @@ pub struct RootedContainer {
}
#[test]
fn bindgen_test_layout_RootedContainer() {
- assert_eq!(::std::mem::size_of::<RootedContainer>() , 24usize);
- assert_eq! (::std::mem::align_of::<RootedContainer>() , 8usize);
+ assert_eq!(::std::mem::size_of::<RootedContainer>() , 24usize , concat ! (
+ "Size of: " , stringify ! ( RootedContainer ) ));
+ assert_eq! (::std::mem::align_of::<RootedContainer>() , 8usize , concat !
+ ( "Alignment of " , stringify ! ( RootedContainer ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const RootedContainer ) ) . root as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( RootedContainer ) ,
+ "::" , stringify ! ( root ) ));
}
impl Clone for RootedContainer {
fn clone(&self) -> Self { *self }
@@ -66,11 +70,15 @@ pub struct PODButContainsDtor {
}
#[test]
fn bindgen_test_layout_PODButContainsDtor() {
- assert_eq!(::std::mem::size_of::<PODButContainsDtor>() , 4usize);
- assert_eq! (::std::mem::align_of::<PODButContainsDtor>() , 4usize);
+ assert_eq!(::std::mem::size_of::<PODButContainsDtor>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( PODButContainsDtor ) ));
+ assert_eq! (::std::mem::align_of::<PODButContainsDtor>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( PODButContainsDtor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const PODButContainsDtor ) ) . member as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( PODButContainsDtor ) ,
+ "::" , stringify ! ( member ) ));
}
/** <div rustbindgen opaque> */
#[repr(C)]
@@ -85,11 +93,15 @@ pub struct POD {
}
#[test]
fn bindgen_test_layout_POD() {
- assert_eq!(::std::mem::size_of::<POD>() , 4usize);
- assert_eq! (::std::mem::align_of::<POD>() , 4usize);
+ assert_eq!(::std::mem::size_of::<POD>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( POD ) ));
+ assert_eq! (::std::mem::align_of::<POD>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( POD ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const POD ) ) . opaque_member as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( POD ) , "::" ,
+ stringify ! ( opaque_member ) ));
}
impl Clone for POD {
fn clone(&self) -> Self { *self }
@@ -127,8 +139,10 @@ pub struct Untemplated {
}
#[test]
fn bindgen_test_layout_Untemplated() {
- assert_eq!(::std::mem::size_of::<Untemplated>() , 1usize);
- assert_eq! (::std::mem::align_of::<Untemplated>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Untemplated>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Untemplated ) ));
+ assert_eq! (::std::mem::align_of::<Untemplated>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Untemplated ) ));
}
impl Clone for Untemplated {
fn clone(&self) -> Self { *self }
@@ -180,14 +194,22 @@ pub struct TemplateWithVar<T> {
#[test]
fn __bindgen_test_layout_template_1() {
assert_eq!(::std::mem::size_of::<Foo<::std::os::raw::c_int, ::std::os::raw::c_int>>()
- , 24usize);
+ , 24usize , concat ! (
+ "Size of template specialization: " , stringify ! (
+ Foo<::std::os::raw::c_int, ::std::os::raw::c_int> ) ));
assert_eq!(::std::mem::align_of::<Foo<::std::os::raw::c_int, ::std::os::raw::c_int>>()
- , 8usize);
+ , 8usize , concat ! (
+ "Alignment of template specialization: " , stringify ! (
+ Foo<::std::os::raw::c_int, ::std::os::raw::c_int> ) ));
}
#[test]
fn __bindgen_test_layout_template_2() {
assert_eq!(::std::mem::size_of::<WithDtor<::std::os::raw::c_int>>() ,
- 4usize);
+ 4usize , concat ! (
+ "Size of template specialization: " , stringify ! (
+ WithDtor<::std::os::raw::c_int> ) ));
assert_eq!(::std::mem::align_of::<WithDtor<::std::os::raw::c_int>>() ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of template specialization: " , stringify ! (
+ WithDtor<::std::os::raw::c_int> ) ));
}
diff --git a/tests/expectations/tests/type-referenced-by-whitelisted-function.rs b/tests/expectations/tests/type-referenced-by-whitelisted-function.rs
index 0fd411d2..f4201a56 100644
--- a/tests/expectations/tests/type-referenced-by-whitelisted-function.rs
+++ b/tests/expectations/tests/type-referenced-by-whitelisted-function.rs
@@ -11,11 +11,15 @@ pub struct dl_phdr_info {
}
#[test]
fn bindgen_test_layout_dl_phdr_info() {
- assert_eq!(::std::mem::size_of::<dl_phdr_info>() , 4usize);
- assert_eq! (::std::mem::align_of::<dl_phdr_info>() , 4usize);
+ assert_eq!(::std::mem::size_of::<dl_phdr_info>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( dl_phdr_info ) ));
+ assert_eq! (::std::mem::align_of::<dl_phdr_info>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( dl_phdr_info ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const dl_phdr_info ) ) . x as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( dl_phdr_info ) , "::" ,
+ stringify ! ( x ) ));
}
impl Clone for dl_phdr_info {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/type_alias_template_specialized.rs b/tests/expectations/tests/type_alias_template_specialized.rs
index d898561d..5dd2038f 100644
--- a/tests/expectations/tests/type_alias_template_specialized.rs
+++ b/tests/expectations/tests/type_alias_template_specialized.rs
@@ -11,11 +11,15 @@ pub struct Rooted {
}
#[test]
fn bindgen_test_layout_Rooted() {
- assert_eq!(::std::mem::size_of::<Rooted>() , 4usize);
- assert_eq! (::std::mem::align_of::<Rooted>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Rooted>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Rooted ) ));
+ assert_eq! (::std::mem::align_of::<Rooted>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Rooted ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Rooted ) ) . ptr as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Rooted ) , "::" ,
+ stringify ! ( ptr ) ));
}
impl Clone for Rooted {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/typeref.rs b/tests/expectations/tests/typeref.rs
index 1153374f..c199b7ab 100644
--- a/tests/expectations/tests/typeref.rs
+++ b/tests/expectations/tests/typeref.rs
@@ -35,11 +35,15 @@ pub struct nsFoo {
}
#[test]
fn bindgen_test_layout_nsFoo() {
- assert_eq!(::std::mem::size_of::<nsFoo>() , 8usize);
- assert_eq! (::std::mem::align_of::<nsFoo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<nsFoo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( nsFoo ) ));
+ assert_eq! (::std::mem::align_of::<nsFoo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( nsFoo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsFoo ) ) . mBar as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( nsFoo ) , "::" ,
+ stringify ! ( mBar ) ));
}
impl Clone for nsFoo {
fn clone(&self) -> Self { *self }
@@ -51,11 +55,17 @@ pub struct mozilla_FragmentOrURL {
}
#[test]
fn bindgen_test_layout_mozilla_FragmentOrURL() {
- assert_eq!(::std::mem::size_of::<mozilla_FragmentOrURL>() , 1usize);
- assert_eq! (::std::mem::align_of::<mozilla_FragmentOrURL>() , 1usize);
+ assert_eq!(::std::mem::size_of::<mozilla_FragmentOrURL>() , 1usize ,
+ concat ! ( "Size of: " , stringify ! ( mozilla_FragmentOrURL )
+ ));
+ assert_eq! (::std::mem::align_of::<mozilla_FragmentOrURL>() , 1usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( mozilla_FragmentOrURL ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const mozilla_FragmentOrURL ) ) . mIsLocalRef
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( mozilla_FragmentOrURL )
+ , "::" , stringify ! ( mIsLocalRef ) ));
}
impl Clone for mozilla_FragmentOrURL {
fn clone(&self) -> Self { *self }
@@ -67,8 +77,10 @@ pub struct mozilla_Position {
}
#[test]
fn bindgen_test_layout_mozilla_Position() {
- assert_eq!(::std::mem::size_of::<mozilla_Position>() , 1usize);
- assert_eq! (::std::mem::align_of::<mozilla_Position>() , 1usize);
+ assert_eq!(::std::mem::size_of::<mozilla_Position>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( mozilla_Position ) ));
+ assert_eq! (::std::mem::align_of::<mozilla_Position>() , 1usize , concat !
+ ( "Alignment of " , stringify ! ( mozilla_Position ) ));
}
impl Clone for mozilla_Position {
fn clone(&self) -> Self { *self }
@@ -94,11 +106,15 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 8usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . mFoo as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( mFoo ) ));
}
impl Clone for Bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union-in-ns.rs b/tests/expectations/tests/union-in-ns.rs
index b6cbfd86..cb69d603 100644
--- a/tests/expectations/tests/union-in-ns.rs
+++ b/tests/expectations/tests/union-in-ns.rs
@@ -43,11 +43,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_bar() {
- assert_eq!(::std::mem::size_of::<bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( bar ) ));
+ assert_eq! (::std::mem::align_of::<bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const bar ) ) . baz as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( bar ) , "::" ,
+ stringify ! ( baz ) ));
}
impl Clone for bar {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_dtor.rs b/tests/expectations/tests/union_dtor.rs
index 47bca484..ad707b63 100644
--- a/tests/expectations/tests/union_dtor.rs
+++ b/tests/expectations/tests/union_dtor.rs
@@ -37,12 +37,18 @@ pub struct UnionWithDtor {
}
#[test]
fn bindgen_test_layout_UnionWithDtor() {
- assert_eq!(::std::mem::size_of::<UnionWithDtor>() , 8usize);
- assert_eq! (::std::mem::align_of::<UnionWithDtor>() , 8usize);
+ assert_eq!(::std::mem::size_of::<UnionWithDtor>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( UnionWithDtor ) ));
+ assert_eq! (::std::mem::align_of::<UnionWithDtor>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( UnionWithDtor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const UnionWithDtor ) ) . mFoo as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( UnionWithDtor ) , "::"
+ , stringify ! ( mFoo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const UnionWithDtor ) ) . mBar as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( UnionWithDtor ) , "::"
+ , stringify ! ( mBar ) ));
}
diff --git a/tests/expectations/tests/union_fields.rs b/tests/expectations/tests/union_fields.rs
index 1dfe1ef1..64eb3fe4 100644
--- a/tests/expectations/tests/union_fields.rs
+++ b/tests/expectations/tests/union_fields.rs
@@ -38,17 +38,25 @@ pub struct _bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 8usize);
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( _bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<_bindgen_ty_1>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( _bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) . mInt as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( mInt ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) . mFloat as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( mFloat ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) . mPointer as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( mPointer ) ));
}
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_anon_struct.rs b/tests/expectations/tests/union_with_anon_struct.rs
index 6a3469dc..4b9c635f 100644
--- a/tests/expectations/tests/union_with_anon_struct.rs
+++ b/tests/expectations/tests/union_with_anon_struct.rs
@@ -42,25 +42,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 8usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 4usize);
+ usize } , 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_anon_struct_bitfield.rs b/tests/expectations/tests/union_with_anon_struct_bitfield.rs
index af06fea7..449fd440 100644
--- a/tests/expectations/tests/union_with_anon_struct_bitfield.rs
+++ b/tests/expectations/tests/union_with_anon_struct_bitfield.rs
@@ -42,8 +42,10 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -78,11 +80,15 @@ impl foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( a ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_anon_union.rs b/tests/expectations/tests/union_with_anon_union.rs
index f5bb4dd9..16b33551 100644
--- a/tests/expectations/tests/union_with_anon_union.rs
+++ b/tests/expectations/tests/union_with_anon_union.rs
@@ -43,25 +43,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 4usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_anon_unnamed_struct.rs b/tests/expectations/tests/union_with_anon_unnamed_struct.rs
index 4e5fe915..7982728a 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_struct.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_struct.rs
@@ -45,31 +45,46 @@ pub struct pixel__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_pixel__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<pixel__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<pixel__bindgen_ty_1>() , 1usize);
+ assert_eq!(::std::mem::size_of::<pixel__bindgen_ty_1>() , 4usize , concat
+ ! ( "Size of: " , stringify ! ( pixel__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<pixel__bindgen_ty_1>() , 1usize ,
+ concat ! (
+ "Alignment of " , stringify ! ( pixel__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pixel__bindgen_ty_1 ) ) . r as * const _
- as usize } , 0usize);
+ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( pixel__bindgen_ty_1 ) ,
+ "::" , stringify ! ( r ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pixel__bindgen_ty_1 ) ) . g as * const _
- as usize } , 1usize);
+ as usize } , 1usize , concat ! (
+ "Alignment of field: " , stringify ! ( pixel__bindgen_ty_1 ) ,
+ "::" , stringify ! ( g ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pixel__bindgen_ty_1 ) ) . b as * const _
- as usize } , 2usize);
+ as usize } , 2usize , concat ! (
+ "Alignment of field: " , stringify ! ( pixel__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pixel__bindgen_ty_1 ) ) . a as * const _
- as usize } , 3usize);
+ as usize } , 3usize , concat ! (
+ "Alignment of field: " , stringify ! ( pixel__bindgen_ty_1 ) ,
+ "::" , stringify ! ( a ) ));
}
impl Clone for pixel__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_pixel() {
- assert_eq!(::std::mem::size_of::<pixel>() , 4usize);
- assert_eq! (::std::mem::align_of::<pixel>() , 4usize);
+ assert_eq!(::std::mem::size_of::<pixel>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( pixel ) ));
+ assert_eq! (::std::mem::align_of::<pixel>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( pixel ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pixel ) ) . rgba as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( pixel ) , "::" ,
+ stringify ! ( rgba ) ));
}
impl Clone for pixel {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_anon_unnamed_union.rs b/tests/expectations/tests/union_with_anon_unnamed_union.rs
index e9197ad7..1e7f918c 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_union.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_union.rs
@@ -44,25 +44,35 @@ pub struct foo__bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 2usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 2usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 2usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 2usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( b ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1 ) ) . c as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo__bindgen_ty_1 ) ,
+ "::" , stringify ! ( c ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( a ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_big_member.rs b/tests/expectations/tests/union_with_big_member.rs
index f0556259..58407cdb 100644
--- a/tests/expectations/tests/union_with_big_member.rs
+++ b/tests/expectations/tests/union_with_big_member.rs
@@ -37,14 +37,20 @@ pub struct WithBigArray {
}
#[test]
fn bindgen_test_layout_WithBigArray() {
- assert_eq!(::std::mem::size_of::<WithBigArray>() , 132usize);
- assert_eq! (::std::mem::align_of::<WithBigArray>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithBigArray>() , 132usize , concat ! (
+ "Size of: " , stringify ! ( WithBigArray ) ));
+ assert_eq! (::std::mem::align_of::<WithBigArray>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( WithBigArray ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigArray ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigArray ) , "::" ,
+ stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigArray ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigArray ) , "::" ,
+ stringify ! ( b ) ));
}
impl Clone for WithBigArray {
fn clone(&self) -> Self { *self }
@@ -58,14 +64,20 @@ pub struct WithBigArray2 {
}
#[test]
fn bindgen_test_layout_WithBigArray2() {
- assert_eq!(::std::mem::size_of::<WithBigArray2>() , 36usize);
- assert_eq! (::std::mem::align_of::<WithBigArray2>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithBigArray2>() , 36usize , concat ! (
+ "Size of: " , stringify ! ( WithBigArray2 ) ));
+ assert_eq! (::std::mem::align_of::<WithBigArray2>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( WithBigArray2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigArray2 ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigArray2 ) , "::"
+ , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigArray2 ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigArray2 ) , "::"
+ , stringify ! ( b ) ));
}
impl Clone for WithBigArray2 {
fn clone(&self) -> Self { *self }
@@ -79,14 +91,20 @@ pub struct WithBigMember {
}
#[test]
fn bindgen_test_layout_WithBigMember() {
- assert_eq!(::std::mem::size_of::<WithBigMember>() , 132usize);
- assert_eq! (::std::mem::align_of::<WithBigMember>() , 4usize);
+ assert_eq!(::std::mem::size_of::<WithBigMember>() , 132usize , concat ! (
+ "Size of: " , stringify ! ( WithBigMember ) ));
+ assert_eq! (::std::mem::align_of::<WithBigMember>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( WithBigMember ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigMember ) ) . a as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigMember ) , "::"
+ , stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const WithBigMember ) ) . b as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( WithBigMember ) , "::"
+ , stringify ! ( b ) ));
}
impl Clone for WithBigMember {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/union_with_nesting.rs b/tests/expectations/tests/union_with_nesting.rs
index 819dff6e..17c3c8f0 100644
--- a/tests/expectations/tests/union_with_nesting.rs
+++ b/tests/expectations/tests/union_with_nesting.rs
@@ -51,15 +51,25 @@ pub struct foo__bindgen_ty_1__bindgen_ty_1 {
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1__bindgen_ty_1>() ,
- 2usize);
+ 2usize , concat ! (
+ "Size of: " , stringify ! ( foo__bindgen_ty_1__bindgen_ty_1 )
+ ));
assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1__bindgen_ty_1>() ,
- 2usize);
+ 2usize , concat ! (
+ "Alignment of " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_1 ) ) . b1
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( b1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_1 ) ) . b2
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( b2 )
+ ));
}
impl Clone for foo__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
@@ -74,34 +84,50 @@ pub struct foo__bindgen_ty_1__bindgen_ty_2 {
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1__bindgen_ty_2>() ,
- 2usize);
+ 2usize , concat ! (
+ "Size of: " , stringify ! ( foo__bindgen_ty_1__bindgen_ty_2 )
+ ));
assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1__bindgen_ty_2>() ,
- 2usize);
+ 2usize , concat ! (
+ "Alignment of " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_2 ) ) . c1
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( c1 )
+ ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo__bindgen_ty_1__bindgen_ty_2 ) ) . c2
- as * const _ as usize } , 0usize);
+ as * const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! (
+ foo__bindgen_ty_1__bindgen_ty_2 ) , "::" , stringify ! ( c2 )
+ ));
}
impl Clone for foo__bindgen_ty_1__bindgen_ty_2 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 2usize);
+ assert_eq!(::std::mem::size_of::<foo__bindgen_ty_1>() , 4usize , concat !
+ ( "Size of: " , stringify ! ( foo__bindgen_ty_1 ) ));
+ assert_eq! (::std::mem::align_of::<foo__bindgen_ty_1>() , 2usize , concat
+ ! ( "Alignment of " , stringify ! ( foo__bindgen_ty_1 ) ));
}
impl Clone for foo__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 4usize);
- assert_eq! (::std::mem::align_of::<foo>() , 4usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( a ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/unknown_attr.rs b/tests/expectations/tests/unknown_attr.rs
index c58281e9..12a35760 100644
--- a/tests/expectations/tests/unknown_attr.rs
+++ b/tests/expectations/tests/unknown_attr.rs
@@ -14,13 +14,20 @@ pub struct _bindgen_ty_1 {
}
#[test]
fn bindgen_test_layout__bindgen_ty_1() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 32usize);
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_1>() , 32usize , concat ! (
+ "Size of: " , stringify ! ( _bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) .
- __clang_max_align_nonce1 as * const _ as usize } , 0usize);
+ __clang_max_align_nonce1 as * const _ as usize } , 0usize ,
+ concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( __clang_max_align_nonce1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const _bindgen_ty_1 ) ) .
- __clang_max_align_nonce2 as * const _ as usize } , 16usize);
+ __clang_max_align_nonce2 as * const _ as usize } , 16usize ,
+ concat ! (
+ "Alignment of field: " , stringify ! ( _bindgen_ty_1 ) , "::"
+ , stringify ! ( __clang_max_align_nonce2 ) ));
}
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/use-core.rs b/tests/expectations/tests/use-core.rs
index 023d9ee3..f09d1519 100644
--- a/tests/expectations/tests/use-core.rs
+++ b/tests/expectations/tests/use-core.rs
@@ -14,17 +14,25 @@ pub struct foo {
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::core::mem::size_of::<foo>() , 16usize);
- assert_eq! (::core::mem::align_of::<foo>() , 8usize);
+ assert_eq!(::core::mem::size_of::<foo>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::core::mem::align_of::<foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . a as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( a ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . b as * const _ as usize } ,
- 4usize);
+ 4usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( b ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . bar as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( bar ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/var-tracing.rs b/tests/expectations/tests/var-tracing.rs
index 25d58aa4..7a09bcb6 100644
--- a/tests/expectations/tests/var-tracing.rs
+++ b/tests/expectations/tests/var-tracing.rs
@@ -11,11 +11,15 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 4usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Bar ) ) . m_baz as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Bar ) , "::" ,
+ stringify ! ( m_baz ) ));
}
extern "C" {
#[link_name = "_ZN3BarC1Ei"]
@@ -43,8 +47,10 @@ extern "C" {
}
#[test]
fn bindgen_test_layout_Baz() {
- assert_eq!(::std::mem::size_of::<Baz>() , 1usize);
- assert_eq! (::std::mem::align_of::<Baz>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Baz>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Baz ) ));
+ assert_eq! (::std::mem::align_of::<Baz>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Baz ) ));
}
impl Clone for Baz {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/variadic-method.rs b/tests/expectations/tests/variadic-method.rs
index c4e0d3c0..45155128 100644
--- a/tests/expectations/tests/variadic-method.rs
+++ b/tests/expectations/tests/variadic-method.rs
@@ -15,8 +15,10 @@ pub struct Bar {
}
#[test]
fn bindgen_test_layout_Bar() {
- assert_eq!(::std::mem::size_of::<Bar>() , 1usize);
- assert_eq! (::std::mem::align_of::<Bar>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Bar>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Bar ) ));
+ assert_eq! (::std::mem::align_of::<Bar>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Bar ) ));
}
extern "C" {
#[link_name = "_ZN3Bar3fooEPKcz"]
diff --git a/tests/expectations/tests/vector.rs b/tests/expectations/tests/vector.rs
index 9b63adb1..4b689744 100644
--- a/tests/expectations/tests/vector.rs
+++ b/tests/expectations/tests/vector.rs
@@ -11,11 +11,15 @@ pub struct foo {
}
#[test]
fn bindgen_test_layout_foo() {
- assert_eq!(::std::mem::size_of::<foo>() , 8usize);
- assert_eq! (::std::mem::align_of::<foo>() , 8usize);
+ assert_eq!(::std::mem::size_of::<foo>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( foo ) ));
+ assert_eq! (::std::mem::align_of::<foo>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( foo ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const foo ) ) . mMember as * const _ as usize }
- , 0usize);
+ , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( foo ) , "::" ,
+ stringify ! ( mMember ) ));
}
impl Clone for foo {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/virtual_dtor.rs b/tests/expectations/tests/virtual_dtor.rs
index 07cc7ee7..de5e01af 100644
--- a/tests/expectations/tests/virtual_dtor.rs
+++ b/tests/expectations/tests/virtual_dtor.rs
@@ -14,6 +14,8 @@ pub struct nsSlots {
}
#[test]
fn bindgen_test_layout_nsSlots() {
- assert_eq!(::std::mem::size_of::<nsSlots>() , 8usize);
- assert_eq! (::std::mem::align_of::<nsSlots>() , 8usize);
+ assert_eq!(::std::mem::size_of::<nsSlots>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( nsSlots ) ));
+ assert_eq! (::std::mem::align_of::<nsSlots>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( nsSlots ) ));
}
diff --git a/tests/expectations/tests/virtual_inheritance.rs b/tests/expectations/tests/virtual_inheritance.rs
index e93d2864..e0510730 100644
--- a/tests/expectations/tests/virtual_inheritance.rs
+++ b/tests/expectations/tests/virtual_inheritance.rs
@@ -11,11 +11,15 @@ pub struct A {
}
#[test]
fn bindgen_test_layout_A() {
- assert_eq!(::std::mem::size_of::<A>() , 4usize);
- assert_eq! (::std::mem::align_of::<A>() , 4usize);
+ assert_eq!(::std::mem::size_of::<A>() , 4usize , concat ! (
+ "Size of: " , stringify ! ( A ) ));
+ assert_eq! (::std::mem::align_of::<A>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( A ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const A ) ) . foo as * const _ as usize } ,
- 0usize);
+ 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( A ) , "::" , stringify
+ ! ( foo ) ));
}
impl Clone for A {
fn clone(&self) -> Self { *self }
@@ -31,11 +35,15 @@ pub struct B {
}
#[test]
fn bindgen_test_layout_B() {
- assert_eq!(::std::mem::size_of::<B>() , 16usize);
- assert_eq! (::std::mem::align_of::<B>() , 8usize);
+ assert_eq!(::std::mem::size_of::<B>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( B ) ));
+ assert_eq! (::std::mem::align_of::<B>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( B ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const B ) ) . bar as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( B ) , "::" , stringify
+ ! ( bar ) ));
}
impl Clone for B {
fn clone(&self) -> Self { *self }
@@ -51,11 +59,15 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 16usize);
- assert_eq! (::std::mem::align_of::<C>() , 8usize);
+ assert_eq!(::std::mem::size_of::<C>() , 16usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const C ) ) . baz as * const _ as usize } ,
- 8usize);
+ 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
+ ! ( baz ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
@@ -69,8 +81,10 @@ pub struct D {
}
#[test]
fn bindgen_test_layout_D() {
- assert_eq!(::std::mem::size_of::<D>() , 40usize);
- assert_eq! (::std::mem::align_of::<D>() , 8usize);
+ assert_eq!(::std::mem::size_of::<D>() , 40usize , concat ! (
+ "Size of: " , stringify ! ( D ) ));
+ assert_eq! (::std::mem::align_of::<D>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( D ) ));
}
impl Clone for D {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/virtual_overloaded.rs b/tests/expectations/tests/virtual_overloaded.rs
index b101a0a2..9937cf5d 100644
--- a/tests/expectations/tests/virtual_overloaded.rs
+++ b/tests/expectations/tests/virtual_overloaded.rs
@@ -14,8 +14,10 @@ pub struct C {
}
#[test]
fn bindgen_test_layout_C() {
- assert_eq!(::std::mem::size_of::<C>() , 8usize);
- assert_eq! (::std::mem::align_of::<C>() , 8usize);
+ assert_eq!(::std::mem::size_of::<C>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( C ) ));
+ assert_eq! (::std::mem::align_of::<C>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( C ) ));
}
impl Clone for C {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/vtable_recursive_sig.rs b/tests/expectations/tests/vtable_recursive_sig.rs
index 8d69f212..6cf3135f 100644
--- a/tests/expectations/tests/vtable_recursive_sig.rs
+++ b/tests/expectations/tests/vtable_recursive_sig.rs
@@ -11,8 +11,10 @@ pub struct Derived {
}
#[test]
fn bindgen_test_layout_Derived() {
- assert_eq!(::std::mem::size_of::<Derived>() , 8usize);
- assert_eq! (::std::mem::align_of::<Derived>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Derived>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Derived ) ));
+ assert_eq! (::std::mem::align_of::<Derived>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Derived ) ));
}
impl Clone for Derived {
fn clone(&self) -> Self { *self }
@@ -27,8 +29,10 @@ pub struct Base {
}
#[test]
fn bindgen_test_layout_Base() {
- assert_eq!(::std::mem::size_of::<Base>() , 8usize);
- assert_eq! (::std::mem::align_of::<Base>() , 8usize);
+ assert_eq!(::std::mem::size_of::<Base>() , 8usize , concat ! (
+ "Size of: " , stringify ! ( Base ) ));
+ assert_eq! (::std::mem::align_of::<Base>() , 8usize , concat ! (
+ "Alignment of " , stringify ! ( Base ) ));
}
impl Clone for Base {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/weird_bitfields.rs b/tests/expectations/tests/weird_bitfields.rs
index 927b91f8..98765b09 100644
--- a/tests/expectations/tests/weird_bitfields.rs
+++ b/tests/expectations/tests/weird_bitfields.rs
@@ -31,44 +31,70 @@ pub struct Weird {
}
#[test]
fn bindgen_test_layout_Weird() {
- assert_eq!(::std::mem::size_of::<Weird>() , 24usize);
- assert_eq! (::std::mem::align_of::<Weird>() , 4usize);
+ assert_eq!(::std::mem::size_of::<Weird>() , 24usize , concat ! (
+ "Size of: " , stringify ! ( Weird ) ));
+ assert_eq! (::std::mem::align_of::<Weird>() , 4usize , concat ! (
+ "Alignment of " , stringify ! ( Weird ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mStrokeDasharrayLength as *
- const _ as usize } , 0usize);
+ const _ as usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mStrokeDasharrayLength ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mClipRule as * const _ as
- usize } , 8usize);
+ usize } , 8usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mClipRule ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mColorInterpolation as *
- const _ as usize } , 9usize);
+ const _ as usize } , 9usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mColorInterpolation ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mColorInterpolationFilters as
- * const _ as usize } , 10usize);
+ * const _ as usize } , 10usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mColorInterpolationFilters ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mFillRule as * const _ as
- usize } , 11usize);
+ usize } , 11usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mFillRule ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mImageRendering as * const _
- as usize } , 12usize);
+ as usize } , 12usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mImageRendering ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mPaintOrder as * const _ as
- usize } , 13usize);
+ usize } , 13usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mPaintOrder ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mShapeRendering as * const _
- as usize } , 14usize);
+ as usize } , 14usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mShapeRendering ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mStrokeLinecap as * const _
- as usize } , 15usize);
+ as usize } , 15usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mStrokeLinecap ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mStrokeLinejoin as * const _
- as usize } , 16usize);
+ as usize } , 16usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mStrokeLinejoin ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mTextAnchor as * const _ as
- usize } , 17usize);
+ usize } , 17usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mTextAnchor ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Weird ) ) . mTextRendering as * const _
- as usize } , 18usize);
+ as usize } , 18usize , concat ! (
+ "Alignment of field: " , stringify ! ( Weird ) , "::" ,
+ stringify ! ( mTextRendering ) ));
}
impl Clone for Weird {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/what_is_going_on.rs b/tests/expectations/tests/what_is_going_on.rs
index c4d54d05..d0265c4e 100644
--- a/tests/expectations/tests/what_is_going_on.rs
+++ b/tests/expectations/tests/what_is_going_on.rs
@@ -11,8 +11,10 @@ pub struct UnknownUnits {
}
#[test]
fn bindgen_test_layout_UnknownUnits() {
- assert_eq!(::std::mem::size_of::<UnknownUnits>() , 1usize);
- assert_eq! (::std::mem::align_of::<UnknownUnits>() , 1usize);
+ assert_eq!(::std::mem::size_of::<UnknownUnits>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( UnknownUnits ) ));
+ assert_eq! (::std::mem::align_of::<UnknownUnits>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( UnknownUnits ) ));
}
impl Clone for UnknownUnits {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/whitelist-namespaces-basic.rs b/tests/expectations/tests/whitelist-namespaces-basic.rs
index cfd9e5f3..06f24ff0 100644
--- a/tests/expectations/tests/whitelist-namespaces-basic.rs
+++ b/tests/expectations/tests/whitelist-namespaces-basic.rs
@@ -20,8 +20,10 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Helper() {
- assert_eq!(::std::mem::size_of::<Helper>() , 1usize);
- assert_eq! (::std::mem::align_of::<Helper>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Helper>() , 1usize , concat !
+ ( "Size of: " , stringify ! ( Helper ) ));
+ assert_eq! (::std::mem::align_of::<Helper>() , 1usize , concat
+ ! ( "Alignment of " , stringify ! ( Helper ) ));
}
impl Clone for Helper {
fn clone(&self) -> Self { *self }
diff --git a/tests/expectations/tests/whitelist-namespaces.rs b/tests/expectations/tests/whitelist-namespaces.rs
index 85816721..d3707800 100644
--- a/tests/expectations/tests/whitelist-namespaces.rs
+++ b/tests/expectations/tests/whitelist-namespaces.rs
@@ -20,8 +20,10 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Helper() {
- assert_eq!(::std::mem::size_of::<Helper>() , 1usize);
- assert_eq! (::std::mem::align_of::<Helper>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Helper>() , 1usize , concat !
+ ( "Size of: " , stringify ! ( Helper ) ));
+ assert_eq! (::std::mem::align_of::<Helper>() , 1usize , concat
+ ! ( "Alignment of " , stringify ! ( Helper ) ));
}
impl Clone for Helper {
fn clone(&self) -> Self { *self }
@@ -34,11 +36,15 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_Test() {
- assert_eq!(::std::mem::size_of::<Test>() , 1usize);
- assert_eq! (::std::mem::align_of::<Test>() , 1usize);
+ assert_eq!(::std::mem::size_of::<Test>() , 1usize , concat ! (
+ "Size of: " , stringify ! ( Test ) ));
+ assert_eq! (::std::mem::align_of::<Test>() , 1usize , concat ! (
+ "Alignment of " , stringify ! ( Test ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const Test ) ) . helper as * const _ as
- usize } , 0usize);
+ usize } , 0usize , concat ! (
+ "Alignment of field: " , stringify ! ( Test ) , "::" ,
+ stringify ! ( helper ) ));
}
impl Clone for Test {
fn clone(&self) -> Self { *self }