diff options
author | Edward Barnard <eabarnard@gmail.com> | 2015-01-01 13:48:28 +0000 |
---|---|---|
committer | Edward Barnard <eabarnard@gmail.com> | 2015-01-01 13:48:28 +0000 |
commit | 69b39ce4243a8da3ddf9bf4ca73d34ffe127b6c0 (patch) | |
tree | e646f079117da769aee3a5ea8c58b48b4255e8c3 /tests | |
parent | fc0a9ab26a32344308d92407ec28ef43d155dc85 (diff) |
Arrays of type in function arguments now generate pointers to type as per the C90 standard. Closes #97.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/headers/func_with_array_arg.h | 1 | ||||
-rw-r--r-- | tests/test_func.rs | 11 |
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 |