Created
October 11, 2017 08:44
-
-
Save pepyakin/245dc175fe4abf4eb7677883c485c982 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
failures: | |
---- test_header_contents stdout ---- | |
thread 'test_header_contents' panicked at 'assertion failed: `(left == right)` | |
left: `"/* automatically generated by rust-bindgen */\n\nextern \"C\" {\n pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;\n}\n"`, | |
right: `"/* automatically generated by rust-bindgen */\n\nextern \"C\" {\n #[link_name = \"\\u{1}_foo\"]\n pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;\n}\n"`', tests/tests.rs:319:4 | |
stack backtrace: | |
0: 0x10948f213 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h5d6b821bcccc8af3 | |
1: 0x10949321a - std::panicking::default_hook::{{closure}}::haca53f8b96e15b81 | |
2: 0x109492d18 - std::panicking::default_hook::h0029f59c1ec97ffc | |
3: 0x1094954e2 - std::panicking::rust_panic_with_hook::hb8eae939c3fcaf9c | |
4: 0x109495344 - std::panicking::begin_panic_new::h3c5f9a0be81106be | |
5: 0x109495292 - std::panicking::begin_panic_fmt::hf585b6224c51a06c | |
6: 0x108bb5fa9 - tests::test_header_contents::h8a7973855c7cd510 | |
7: 0x109456921 - <F as test::FnBox<T>>::call_box::h88fe84a510dab8dd | |
8: 0x1094966bc - __rust_maybe_catch_panic | |
9: 0x109447348 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb43ec92c3523e599 | |
10: 0x109448127 - std::panicking::try::do_call::h8a550a9232e81176 | |
11: 0x1094966bc - __rust_maybe_catch_panic | |
12: 0x109450283 - <F as alloc::boxed::FnBox<A>>::call_box::hacbca7a24de7f7d5 | |
13: 0x1094927ab - std::sys::imp::thread::Thread::new::thread_start::h823686b907c11c46 | |
14: 0x7fffd586493a - _pthread_body | |
15: 0x7fffd5864886 - _pthread_start | |
---- test_multiple_header_calls_in_builder stdout ---- | |
Generated bindings differ from expected! | |
/* automatically generated by rust-bindgen */ | |
extern "C" { | |
- #[link_name = "\u{1}_foo"] | |
+ #[link_name = "\u{1}foo"] | |
pub static mut foo: | |
::std::option::Option< | |
unsafe extern "C" fn(x: ::std::os::raw::c_int, y: ::std::os::raw::c_int) | |
-> ::std::os::raw::c_int, | |
>; | |
} | |
pub type Char = ::std::os::raw::c_char; | |
pub type SChar = ::std::os::raw::c_schar; | |
pub type UChar = ::std::os::raw::c_uchar; | |
#[repr(C)] | |
#[derive(Debug, Copy)] | |
pub struct Test { | |
pub ch: ::std::os::raw::c_char, | |
pub u: ::std::os::raw::c_uchar, | |
pub d: ::std::os::raw::c_schar, | |
pub cch: ::std::os::raw::c_char, | |
pub cu: ::std::os::raw::c_uchar, | |
pub cd: ::std::os::raw::c_schar, | |
pub Cch: Char, | |
pub Cu: UChar, | |
pub Cd: SChar, | |
pub Ccch: Char, | |
pub Ccu: UChar, | |
pub Ccd: SChar, | |
} | |
#[test] | |
fn bindgen_test_layout_Test() { | |
assert_eq!( | |
::std::mem::size_of::<Test>(), | |
12usize, | |
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)).ch as *const _ as usize }, | |
0usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(ch) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).u as *const _ as usize }, | |
1usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(u) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).d as *const _ as usize }, | |
2usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(d) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).cch as *const _ as usize }, | |
3usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(cch) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).cu as *const _ as usize }, | |
4usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(cu) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).cd as *const _ as usize }, | |
5usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(cd) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).Cch as *const _ as usize }, | |
6usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(Cch) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).Cu as *const _ as usize }, | |
7usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(Cu) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).Cd as *const _ as usize }, | |
8usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(Cd) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).Ccch as *const _ as usize }, | |
9usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(Ccch) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).Ccu as *const _ as usize }, | |
10usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(Ccu) | |
) | |
); | |
assert_eq!( | |
unsafe { &(*(0 as *const Test)).Ccd as *const _ as usize }, | |
11usize, | |
concat!( | |
"Alignment of field: ", | |
stringify!(Test), | |
"::", | |
stringify!(Ccd) | |
) | |
); | |
} | |
impl Clone for Test { | |
fn clone(&self) -> Self { | |
*self | |
} | |
} | |
thread 'test_multiple_header_calls_in_builder' panicked at 'explicit panic', tests/tests.rs:357:8 | |
stack backtrace: | |
0: 0x10948f213 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h5d6b821bcccc8af3 | |
1: 0x10949321a - std::panicking::default_hook::{{closure}}::haca53f8b96e15b81 | |
2: 0x109492d18 - std::panicking::default_hook::h0029f59c1ec97ffc | |
3: 0x1094954e2 - std::panicking::rust_panic_with_hook::hb8eae939c3fcaf9c | |
4: 0x108ababe9 - std::panicking::begin_panic_new::h7e4db367a0bc4379 | |
5: 0x108bb69d2 - tests::test_multiple_header_calls_in_builder::h6606ca7360dcb90d | |
6: 0x109456921 - <F as test::FnBox<T>>::call_box::h88fe84a510dab8dd | |
7: 0x1094966bc - __rust_maybe_catch_panic | |
8: 0x109447348 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb43ec92c3523e599 | |
9: 0x109448127 - std::panicking::try::do_call::h8a550a9232e81176 | |
10: 0x1094966bc - __rust_maybe_catch_panic | |
11: 0x109450283 - <F as alloc::boxed::FnBox<A>>::call_box::hacbca7a24de7f7d5 | |
12: 0x1094927ab - std::sys::imp::thread::Thread::new::thread_start::h823686b907c11c46 | |
13: 0x7fffd586493a - _pthread_body | |
14: 0x7fffd5864886 - _pthread_start | |
failures: | |
test_header_contents | |
test_multiple_header_calls_in_builder | |
test result: FAILED. 372 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out | |
error: test failed, to rerun pass '--test tests' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment