diff options
author | Edward Barnard <eabarnard@gmail.com> | 2014-12-28 20:31:50 +0100 |
---|---|---|
committer | Edward Barnard <eabarnard@gmail.com> | 2014-12-28 23:25:52 +0100 |
commit | 02d34166ff3b1ab192f949e9eb880dd54a476b50 (patch) | |
tree | 1a71d956f4bd197fb4563ab01da05a80eee6892a /tests | |
parent | 077110b6bf57a8f58aaac91eee8903246a84b62f (diff) |
Switch to using canonical cursors. Closes #139.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/forward_declared_struct.rs | 12 | ||||
-rw-r--r-- | tests/headers/struct_containing_forward_declared_struct.h | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/forward_declared_struct.rs b/tests/forward_declared_struct.rs new file mode 100644 index 00000000..7e9bfc8b --- /dev/null +++ b/tests/forward_declared_struct.rs @@ -0,0 +1,12 @@ +#![feature(phase)] + +#[phase(plugin)] +extern crate bindgen; + +extern crate libc; + +#[test] +fn test_struct_containing_forward_declared_struct() { + mod ffi { bindgen!("headers/struct_containing_forward_declared_struct.h"); } + // Checking that struct b is not duplicated +}
\ No newline at end of file diff --git a/tests/headers/struct_containing_forward_declared_struct.h b/tests/headers/struct_containing_forward_declared_struct.h new file mode 100644 index 00000000..c68af042 --- /dev/null +++ b/tests/headers/struct_containing_forward_declared_struct.h @@ -0,0 +1,7 @@ +struct a { + struct b* val_a; +}; + +struct b { + int val_b; +};
\ No newline at end of file |