From 161a90a9f90dc0ff6f62aff374e179f6c08a9949 Mon Sep 17 00:00:00 2001 From: Emilio Cobos Álvarez Date: Sat, 29 Oct 2016 22:27:11 +0200 Subject: Add a test for elaborated types. After the rewrite, this works. Fixes #3 --- tests/expectations/elaborated.rs | 11 +++++++++++ tests/headers/elaborated.hpp | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 tests/expectations/elaborated.rs create mode 100644 tests/headers/elaborated.hpp diff --git a/tests/expectations/elaborated.rs b/tests/expectations/elaborated.rs new file mode 100644 index 00000000..db373d41 --- /dev/null +++ b/tests/expectations/elaborated.rs @@ -0,0 +1,11 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +pub type whatever_t = ::std::os::raw::c_int; +extern "C" { + #[link_name = "_Z9somethingPKi"] + pub fn something(wat: *const whatever_t); +} diff --git a/tests/headers/elaborated.hpp b/tests/headers/elaborated.hpp new file mode 100644 index 00000000..4bfbff23 --- /dev/null +++ b/tests/headers/elaborated.hpp @@ -0,0 +1,5 @@ +namespace whatever { + typedef int whatever_t; +} + +void something(const whatever::whatever_t *wat); -- cgit v1.2.3