summaryrefslogtreecommitdiff
path: root/tests/test_struct.rs
diff options
context:
space:
mode:
authorEdward Barnard <eabarnard@gmail.com>2015-01-01 15:59:43 +0000
committerEdward Barnard <eabarnard@gmail.com>2015-01-01 16:22:12 +0000
commitb9b468b897c970db6f7008f1ff81518a3c6966f7 (patch)
tree9d9c46a0382cfbf16ee50d903702540b6c5eddfe /tests/test_struct.rs
parent69b39ce4243a8da3ddf9bf4ca73d34ffe127b6c0 (diff)
Structs containing bitfields are now the correct size and bitfield accessors can be written by hand if required.
Diffstat (limited to 'tests/test_struct.rs')
-rw-r--r--tests/test_struct.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/test_struct.rs b/tests/test_struct.rs
index c6f6836f..d9d8f930 100644
--- a/tests/test_struct.rs
+++ b/tests/test_struct.rs
@@ -132,18 +132,16 @@ fn containing_fwd_decl_struct() {
}
#[test]
-fn with_unnamed_bitfields() {
- assert_bind_eq!("headers/unnamed_bitfields.h", cx,
+fn with_bitfields() {
+ assert_bind_eq!("headers/struct_with_bitfields.h", cx,
quote_item!(cx,
#[repr(C)]
#[deriving(Copy)]
pub struct Struct_bitfield {
- pub a: ::libc::c_ushort,
- pub b: ::libc::c_ushort,
- pub c: ::libc::c_ushort,
- pub unnamed_field1: ::libc::c_ushort,
- pub unnamed_field2: ::libc::c_ushort,
- pub d: ::libc::c_ushort,
+ pub _bindgen_bitfield_1_: ::libc::c_ushort,
+ pub e: ::libc::c_int,
+ pub _bindgen_bitfield_2_: ::libc::c_uint,
+ pub _bindgen_bitfield_3_: ::libc::c_uint,
}
),
quote_item!(cx,