summaryrefslogtreecommitdiff
path: root/tests/expectations/namespace.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expectations/namespace.rs')
-rw-r--r--tests/expectations/namespace.rs71
1 files changed, 43 insertions, 28 deletions
diff --git a/tests/expectations/namespace.rs b/tests/expectations/namespace.rs
index 36113536..0bd6e8e0 100644
--- a/tests/expectations/namespace.rs
+++ b/tests/expectations/namespace.rs
@@ -4,17 +4,8 @@
#![allow(non_snake_case)]
-pub use root::*;
pub mod root {
- #[repr(C)]
- #[derive(Debug)]
- pub struct Struct_C<T> {
- pub _base: __anonymous1::Struct_A,
- pub m_c: T,
- pub m_c_ptr: *mut T,
- pub m_c_arr: [T; 10usize],
- pub _phantom0: ::std::marker::PhantomData<T>,
- }
+ use root;
extern "C" {
#[link_name = "_Z9top_levelv"]
pub fn top_level();
@@ -27,44 +18,68 @@ pub mod root {
pub fn in_whatever();
}
}
- pub mod __anonymous1 {
+ pub mod _bindgen_mod_bindgen_id_12 {
use root;
+ pub mod empty {
+ use root;
+ }
+ extern "C" {
+ #[link_name = "_ZN12_GLOBAL__N_13fooEv"]
+ pub fn foo();
+ }
#[repr(C)]
#[derive(Debug, Copy)]
- pub struct Struct_A {
+ pub struct A {
pub b: root::whatever::whatever_int_t,
}
- impl ::std::clone::Clone for Struct_A {
- fn clone(&self) -> Self { *self }
- }
#[test]
- fn bindgen_test_layout_Struct_A() {
- assert_eq!(::std::mem::size_of::<Struct_A>() , 4usize);
- assert_eq!(::std::mem::align_of::<Struct_A>() , 4usize);
- }
- extern "C" {
- #[link_name = "_ZN12_GLOBAL__N_13fooEv"]
- pub fn foo();
+ fn bindgen_test_layout_A() {
+ assert_eq!(::std::mem::size_of::<A>() , 4usize);
+ assert_eq!(::std::mem::align_of::<A>() , 4usize);
}
- pub mod empty {
- use root;
+ impl Clone for A {
+ fn clone(&self) -> Self { *self }
}
}
+ #[repr(C)]
+ #[derive(Debug)]
+ pub struct C<T> {
+ pub _base: root::_bindgen_mod_bindgen_id_12::A,
+ pub m_c: T,
+ pub m_c_ptr: *mut T,
+ pub m_c_arr: [T; 10usize],
+ }
pub mod w {
use root;
pub type whatever_int_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug)]
- pub struct Struct_D<T> {
- pub m_c: root::Struct_C<T>,
+ pub struct D<T> {
+ pub m_c: root::C<T>,
}
extern "C" {
#[link_name = "_ZN1w3hehEv"]
pub fn heh() -> root::w::whatever_int_t;
+ }
+ extern "C" {
#[link_name = "_ZN1w3fooEv"]
- pub fn foo() -> root::Struct_C<::std::os::raw::c_int>;
+ pub fn foo() -> root::C<::std::os::raw::c_int>;
+ }
+ extern "C" {
#[link_name = "_ZN1w4barrEv"]
- pub fn barr() -> root::Struct_C<f32>;
+ pub fn barr() -> root::C<f32>;
}
}
}
+extern "C" {
+ #[link_name = "_Z9top_levelv"]
+ pub fn top_level();
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct C<T> {
+ pub _base: root::_bindgen_mod_bindgen_id_12::A,
+ pub m_c: T,
+ pub m_c_ptr: *mut T,
+ pub m_c_arr: [T; 10usize],
+}