summaryrefslogtreecommitdiff
path: root/tests/expectations/tests/dynamic_loading_with_blocklist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expectations/tests/dynamic_loading_with_blocklist.rs')
-rw-r--r--tests/expectations/tests/dynamic_loading_with_blocklist.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/expectations/tests/dynamic_loading_with_blocklist.rs b/tests/expectations/tests/dynamic_loading_with_blocklist.rs
index aedc0ad4..f2ffe671 100644
--- a/tests/expectations/tests/dynamic_loading_with_blocklist.rs
+++ b/tests/expectations/tests/dynamic_loading_with_blocklist.rs
@@ -22,15 +22,18 @@ fn bindgen_test_layout_X() {
4usize,
concat!("Alignment of ", stringify!(X))
);
- assert_eq!(
- unsafe {
- let uninit = ::std::mem::MaybeUninit::<X>::uninit();
- let ptr = uninit.as_ptr();
- ::std::ptr::addr_of!((*ptr)._x) as usize - ptr as usize
- },
- 0usize,
- concat!("Offset of field: ", stringify!(X), "::", stringify!(_x))
- );
+ fn test_field__x() {
+ assert_eq!(
+ unsafe {
+ let uninit = ::std::mem::MaybeUninit::<X>::uninit();
+ let ptr = uninit.as_ptr();
+ ::std::ptr::addr_of!((*ptr)._x) as usize - ptr as usize
+ },
+ 0usize,
+ concat!("Offset of field: ", stringify!(X), "::", stringify!(_x))
+ );
+ }
+ test_field__x();
}
extern "C" {
#[link_name = "\u{1}_ZN1X13some_functionEv"]