diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-21 19:53:24 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-21 20:08:54 +0100 |
commit | 50a3a6ba89f6e3104ce50f72995b01850f6aff55 (patch) | |
tree | 0efa8aa8333ecb123147bcd741ab88afbb1f304a /libbindgen/tests | |
parent | d80b797754e7d84516999e32c3448b9b38632a59 (diff) |
ir: Handle CXType_Auto.
Diffstat (limited to 'libbindgen/tests')
-rw-r--r-- | libbindgen/tests/expectations/tests/auto.rs | 20 | ||||
-rw-r--r-- | libbindgen/tests/headers/auto.hpp | 6 |
2 files changed, 26 insertions, 0 deletions
diff --git a/libbindgen/tests/expectations/tests/auto.rs b/libbindgen/tests/expectations/tests/auto.rs new file mode 100644 index 00000000..e35f5ed2 --- /dev/null +++ b/libbindgen/tests/expectations/tests/auto.rs @@ -0,0 +1,20 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Foo { + pub _address: u8, +} +pub const Foo_kBar: bool = true; +#[test] +fn bindgen_test_layout_Foo() { + assert_eq!(::std::mem::size_of::<Foo>() , 1usize); + assert_eq!(::std::mem::align_of::<Foo>() , 1usize); +} +impl Clone for Foo { + fn clone(&self) -> Self { *self } +} diff --git a/libbindgen/tests/headers/auto.hpp b/libbindgen/tests/headers/auto.hpp new file mode 100644 index 00000000..64025295 --- /dev/null +++ b/libbindgen/tests/headers/auto.hpp @@ -0,0 +1,6 @@ +// bindgen-flags: -- -std=c++11 +// bindgen-unstable + +class Foo { + static constexpr auto kBar = 2 == 2; +}; |