summaryrefslogtreecommitdiff
path: root/libbindgen/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libbindgen/tests')
-rw-r--r--libbindgen/tests/expectations/tests/anon_enum.rs6
-rw-r--r--libbindgen/tests/expectations/tests/bitfield_method_mangling.rs2
-rw-r--r--libbindgen/tests/expectations/tests/inherit_typedef.rs2
-rw-r--r--libbindgen/tests/expectations/tests/reparented_replacement.rs2
-rw-r--r--libbindgen/tests/expectations/tests/union_fields.rs2
-rw-r--r--libbindgen/tests/expectations/tests/unknown_attr.rs2
-rw-r--r--libbindgen/tests/headers/anon_enum.hpp5
7 files changed, 16 insertions, 5 deletions
diff --git a/libbindgen/tests/expectations/tests/anon_enum.rs b/libbindgen/tests/expectations/tests/anon_enum.rs
index 075830e6..8a287d3d 100644
--- a/libbindgen/tests/expectations/tests/anon_enum.rs
+++ b/libbindgen/tests/expectations/tests/anon_enum.rs
@@ -22,3 +22,9 @@ fn bindgen_test_layout_Test() {
impl Clone for Test {
fn clone(&self) -> Self { *self }
}
+pub const Foo: _bindgen_ty_1 = _bindgen_ty_1::Foo;
+pub const Bar: _bindgen_ty_1 = _bindgen_ty_1::Bar;
+#[repr(u32)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+pub enum _bindgen_ty_1 { Foo = 0, Bar = 1, }
+pub use _bindgen_ty_1 as Baz;
diff --git a/libbindgen/tests/expectations/tests/bitfield_method_mangling.rs b/libbindgen/tests/expectations/tests/bitfield_method_mangling.rs
index 5aba8abb..b7869bf8 100644
--- a/libbindgen/tests/expectations/tests/bitfield_method_mangling.rs
+++ b/libbindgen/tests/expectations/tests/bitfield_method_mangling.rs
@@ -46,4 +46,4 @@ impl _bindgen_ty_1 {
((val as u32 as u32) << 24u32) & (4278190080usize as u32);
}
}
-pub type mach_msg_type_descriptor_t = _bindgen_ty_1;
+pub use _bindgen_ty_1 as mach_msg_type_descriptor_t;
diff --git a/libbindgen/tests/expectations/tests/inherit_typedef.rs b/libbindgen/tests/expectations/tests/inherit_typedef.rs
index ca9041e2..b66cb724 100644
--- a/libbindgen/tests/expectations/tests/inherit_typedef.rs
+++ b/libbindgen/tests/expectations/tests/inherit_typedef.rs
@@ -17,7 +17,7 @@ fn bindgen_test_layout_Foo() {
impl Clone for Foo {
fn clone(&self) -> Self { *self }
}
-pub type TypedefedFoo = Foo;
+pub use Foo as TypedefedFoo;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct Bar {
diff --git a/libbindgen/tests/expectations/tests/reparented_replacement.rs b/libbindgen/tests/expectations/tests/reparented_replacement.rs
index 74ee229c..e8ccc931 100644
--- a/libbindgen/tests/expectations/tests/reparented_replacement.rs
+++ b/libbindgen/tests/expectations/tests/reparented_replacement.rs
@@ -25,5 +25,5 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
}
- pub type ReferencesBar = root::foo::Bar;
+ pub use root::foo::Bar as ReferencesBar;
}
diff --git a/libbindgen/tests/expectations/tests/union_fields.rs b/libbindgen/tests/expectations/tests/union_fields.rs
index 495e80f9..655a30ff 100644
--- a/libbindgen/tests/expectations/tests/union_fields.rs
+++ b/libbindgen/tests/expectations/tests/union_fields.rs
@@ -44,4 +44,4 @@ fn bindgen_test_layout__bindgen_ty_1() {
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
-pub type nsStyleUnion = _bindgen_ty_1;
+pub use _bindgen_ty_1 as nsStyleUnion;
diff --git a/libbindgen/tests/expectations/tests/unknown_attr.rs b/libbindgen/tests/expectations/tests/unknown_attr.rs
index fd9cce45..8ed508c5 100644
--- a/libbindgen/tests/expectations/tests/unknown_attr.rs
+++ b/libbindgen/tests/expectations/tests/unknown_attr.rs
@@ -13,4 +13,4 @@ pub struct _bindgen_ty_1 {
impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
-pub type max_align_t = _bindgen_ty_1;
+pub use _bindgen_ty_1 as max_align_t;
diff --git a/libbindgen/tests/headers/anon_enum.hpp b/libbindgen/tests/headers/anon_enum.hpp
index c7405202..1961fe6c 100644
--- a/libbindgen/tests/headers/anon_enum.hpp
+++ b/libbindgen/tests/headers/anon_enum.hpp
@@ -3,3 +3,8 @@ struct Test {
float bar;
enum { T_NONE };
};
+
+typedef enum {
+ Foo,
+ Bar,
+} Baz;