diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expectations/tests/jsval_layout_opaque.rs | 3 | ||||
-rw-r--r-- | tests/expectations/tests/macro-expr-basic.rs | 14 | ||||
-rw-r--r-- | tests/headers/macro-expr-basic.h | 12 |
3 files changed, 28 insertions, 1 deletions
diff --git a/tests/expectations/tests/jsval_layout_opaque.rs b/tests/expectations/tests/jsval_layout_opaque.rs index f3c1014e..fa611f20 100644 --- a/tests/expectations/tests/jsval_layout_opaque.rs +++ b/tests/expectations/tests/jsval_layout_opaque.rs @@ -24,8 +24,9 @@ impl <T> ::std::clone::Clone for __BindgenUnionField<T> { fn clone(&self) -> Self { Self::new() } } impl <T> ::std::marker::Copy for __BindgenUnionField<T> { } -pub const JSVAL_ALIGNMENT: ::std::os::raw::c_uint = 8; pub const JSVAL_TAG_SHIFT: ::std::os::raw::c_uint = 47; +pub const JSVAL_PAYLOAD_MASK: ::std::os::raw::c_ulonglong = 140737488355327; +pub const JSVAL_TAG_MASK: ::std::os::raw::c_longlong = -140737488355328; #[repr(u8)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueType { diff --git a/tests/expectations/tests/macro-expr-basic.rs b/tests/expectations/tests/macro-expr-basic.rs new file mode 100644 index 00000000..7a5c71e0 --- /dev/null +++ b/tests/expectations/tests/macro-expr-basic.rs @@ -0,0 +1,14 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +pub const FOO: ::std::os::raw::c_uint = 1; +pub const BAR: ::std::os::raw::c_uint = 4; +pub const BAZ: ::std::os::raw::c_uint = 5; +pub const BARR: ::std::os::raw::c_uint = 1; +pub const BAZZ: ::std::os::raw::c_uint = 7; +pub const I_RAN_OUT_OF_DUMB_NAMES: ::std::os::raw::c_uint = 7; +pub const HAZ_A_COMMENT: ::std::os::raw::c_uint = 1; +pub const HAZ_A_COMMENT_INSIDE: ::std::os::raw::c_uint = 2; diff --git a/tests/headers/macro-expr-basic.h b/tests/headers/macro-expr-basic.h new file mode 100644 index 00000000..55b11367 --- /dev/null +++ b/tests/headers/macro-expr-basic.h @@ -0,0 +1,12 @@ +#define FOO 1 +#define BAR 4 +#define BAZ (FOO + BAR) + +#define BARR (1 << 0) +#define BAZZ ((1 << 1) + BAZ) +#define I_RAN_OUT_OF_DUMB_NAMES (BARR | BAZZ) + +/* I haz a comment */ +#define HAZ_A_COMMENT BARR + +#define HAZ_A_COMMENT_INSIDE (/* comment for real */ BARR + FOO) |