summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/expectations/class_static_const.rs22
-rw-r--r--tests/headers/class_static_const.hpp8
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/expectations/class_static_const.rs b/tests/expectations/class_static_const.rs
new file mode 100644
index 00000000..eed6590c
--- /dev/null
+++ b/tests/expectations/class_static_const.rs
@@ -0,0 +1,22 @@
+/* automatically generated by rust-bindgen */
+
+
+#![allow(non_snake_case)]
+
+
+#[repr(C)]
+#[derive(Debug, Copy)]
+pub struct A {
+ pub _address: u8,
+}
+pub const A_a: ::std::os::raw::c_int = 0;
+pub const A_b: i32 = 63;
+pub const A_c: u32 = 255;
+#[test]
+fn bindgen_test_layout_A() {
+ assert_eq!(::std::mem::size_of::<A>() , 1usize);
+ assert_eq!(::std::mem::align_of::<A>() , 1usize);
+}
+impl Clone for A {
+ fn clone(&self) -> Self { *self }
+}
diff --git a/tests/headers/class_static_const.hpp b/tests/headers/class_static_const.hpp
new file mode 100644
index 00000000..150afe8b
--- /dev/null
+++ b/tests/headers/class_static_const.hpp
@@ -0,0 +1,8 @@
+using int32_t = int;
+typedef unsigned int uint32_t;
+
+class A {
+ static const int a = 0;
+ static const int32_t b = 077;
+ static const uint32_t c = 0xff;
+};