summaryrefslogtreecommitdiff
path: root/tests/expectations/typeref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expectations/typeref.rs')
-rw-r--r--tests/expectations/typeref.rs92
1 files changed, 92 insertions, 0 deletions
diff --git a/tests/expectations/typeref.rs b/tests/expectations/typeref.rs
new file mode 100644
index 00000000..35a873c9
--- /dev/null
+++ b/tests/expectations/typeref.rs
@@ -0,0 +1,92 @@
+/* automatically generated by rust-bindgen */
+
+
+#![allow(non_snake_case)]
+
+
+#[derive(Debug)]
+#[repr(C)]
+pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
+impl <T> __BindgenUnionField<T> {
+ #[inline]
+ pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) }
+ #[inline]
+ pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) }
+ #[inline]
+ pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) }
+}
+impl <T> ::std::default::Default for __BindgenUnionField<T> {
+ #[inline]
+ fn default() -> Self { Self::new() }
+}
+impl <T> ::std::clone::Clone for __BindgenUnionField<T> {
+ #[inline]
+ fn clone(&self) -> Self { Self::new() }
+}
+impl <T> ::std::marker::Copy for __BindgenUnionField<T> { }
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct nsFoo {
+ pub mBar: StyleShapeSource<::std::os::raw::c_int>,
+}
+#[test]
+fn bindgen_test_layout_nsFoo() {
+ assert_eq!(::std::mem::size_of::<nsFoo>() , 8usize);
+ assert_eq!(::std::mem::align_of::<nsFoo>() , 8usize);
+}
+impl Clone for nsFoo {
+ fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct FragmentOrURL {
+ pub mIsLocalRef: bool,
+}
+#[test]
+fn bindgen_test_layout_FragmentOrURL() {
+ assert_eq!(::std::mem::size_of::<FragmentOrURL>() , 1usize);
+ assert_eq!(::std::mem::align_of::<FragmentOrURL>() , 1usize);
+}
+impl Clone for FragmentOrURL {
+ fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct Position {
+ pub _address: u8,
+}
+#[test]
+fn bindgen_test_layout_Position() {
+ assert_eq!(::std::mem::size_of::<Position>() , 1usize);
+ assert_eq!(::std::mem::align_of::<Position>() , 1usize);
+}
+impl Clone for Position {
+ fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct Bar {
+ pub mFoo: *mut nsFoo,
+}
+#[test]
+fn bindgen_test_layout_Bar() {
+ assert_eq!(::std::mem::size_of::<Bar>() , 8usize);
+ assert_eq!(::std::mem::align_of::<Bar>() , 8usize);
+}
+impl Clone for Bar {
+ fn clone(&self) -> Self { *self }
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct StyleShapeSource<ReferenceBox> {
+ pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_13<ReferenceBox>,
+ pub _phantom_0: ::std::marker::PhantomData<ReferenceBox>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct StyleShapeSource__bindgen_ty_bindgen_id_13<ReferenceBox> {
+ pub mPosition: __BindgenUnionField<*mut Position>,
+ pub mFragmentOrURL: __BindgenUnionField<*mut FragmentOrURL>,
+ pub bindgen_union_field: u64,
+ pub _phantom_0: ::std::marker::PhantomData<ReferenceBox>,
+}