summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/headers/func_with_array_arg.h1
-rw-r--r--tests/test_func.rs11
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/headers/func_with_array_arg.h b/tests/headers/func_with_array_arg.h
new file mode 100644
index 00000000..1b81702b
--- /dev/null
+++ b/tests/headers/func_with_array_arg.h
@@ -0,0 +1 @@
+void f(int x[2]);
diff --git a/tests/test_func.rs b/tests/test_func.rs
index 8a0f2584..58faf37e 100644
--- a/tests/test_func.rs
+++ b/tests/test_func.rs
@@ -48,3 +48,14 @@ fn with_func_ptr_arg() {
}
));
}
+
+#[test]
+fn with_array_arg() {
+ assert_bind_eq!("headers/func_with_array_arg.h", cx,
+ quote_item!(cx,
+ extern "C" {
+ pub fn f(x: *mut ::libc::c_int);
+ }
+ )
+ );
+} \ No newline at end of file