summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/tests/const_array.rs15
-rw-r--r--tests/headers/const_array.h2
-rw-r--r--tests/tests.rs4
3 files changed, 19 insertions, 2 deletions
diff --git a/tests/expectations/tests/const_array.rs b/tests/expectations/tests/const_array.rs
new file mode 100644
index 00000000..77dec918
--- /dev/null
+++ b/tests/expectations/tests/const_array.rs
@@ -0,0 +1,15 @@
+/* automatically generated by rust-bindgen */
+
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
+
+extern "C" {
+ pub static foo: [::std::os::raw::c_int; 1usize];
+}
+extern "C" {
+ pub static mut bar: [::std::os::raw::c_int; 1usize];
+}
diff --git a/tests/headers/const_array.h b/tests/headers/const_array.h
new file mode 100644
index 00000000..a337881f
--- /dev/null
+++ b/tests/headers/const_array.h
@@ -0,0 +1,2 @@
+extern const int foo[1];
+extern int bar[1];
diff --git a/tests/tests.rs b/tests/tests.rs
index 4824f484..7095068a 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -353,10 +353,10 @@ fn test_clang_env_args() {
"/* automatically generated by rust-bindgen */
extern \"C\" {
- pub static mut x: [::std::os::raw::c_int; 1usize];
+ pub static x: [::std::os::raw::c_int; 1usize];
}
extern \"C\" {
- pub static mut y: [::std::os::raw::c_int; 1usize];
+ pub static y: [::std::os::raw::c_int; 1usize];
}
"
.to_string(),