diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expectations/inner_template_self.rs | 27 | ||||
-rw-r--r-- | tests/headers/inner_template_self.hpp | 10 |
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/expectations/inner_template_self.rs b/tests/expectations/inner_template_self.rs new file mode 100644 index 00000000..84e4f8e6 --- /dev/null +++ b/tests/expectations/inner_template_self.rs @@ -0,0 +1,27 @@ +/* automatically generated by rust-bindgen */ + + +#![feature(const_fn)] +#![allow(non_snake_case)] + + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Struct_LinkedList<T> { + pub next: *mut Struct_LinkedList<T>, + pub prev: *mut Struct_LinkedList<T>, + pub _phantom0: ::std::marker::PhantomData<T>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Struct_InstantiateIt { + pub m_list: Struct_LinkedList<::std::os::raw::c_int>, +} +impl ::std::clone::Clone for Struct_InstantiateIt { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_Struct_InstantiateIt() { + assert_eq!(::std::mem::size_of::<Struct_InstantiateIt>() , 16usize); + assert_eq!(::std::mem::align_of::<Struct_InstantiateIt>() , 8usize); +} diff --git a/tests/headers/inner_template_self.hpp b/tests/headers/inner_template_self.hpp new file mode 100644 index 00000000..1ae5af06 --- /dev/null +++ b/tests/headers/inner_template_self.hpp @@ -0,0 +1,10 @@ + +template <typename T> +class LinkedList { + LinkedList<T>* next; + LinkedList* prev; +}; + +class InstantiateIt { + LinkedList<int> m_list; +}; |