diff options
author | Pierre-Antoine Rault <par@rigelk.eu> | 2017-06-19 01:09:33 +0200 |
---|---|---|
committer | Pierre-Antoine Rault <par@rigelk.eu> | 2017-06-19 23:35:07 +0200 |
commit | 41db162348a51dc2a06901efc4fa6bc1e7f31b14 (patch) | |
tree | 68302d940f6d0ee89b67b88cbe7dfac31ba16876 /tests | |
parent | d37fe132be5350ed1477b4e578a5d1b70c583666 (diff) |
switch defaults from generating unstable Rust to generating stable Rust
- changing the Builder::no_unstable_rust method to the Builder::unstable_rust method
- changing the --no-unstable-rust flag to a --unstable-rust flag in src/options.rs
- changing bindgen-flags header in the test headers to remove the --no-unstable-rust flag
Fixes #757
Diffstat (limited to 'tests')
-rw-r--r-- | tests/headers/jsval_layout_opaque.hpp | 2 | ||||
-rw-r--r-- | tests/headers/only_bitfields.hpp | 1 | ||||
-rw-r--r-- | tests/headers/struct_with_bitfields.h | 1 | ||||
-rw-r--r-- | tests/headers/union_with_anon_struct_bitfield.h | 1 | ||||
-rw-r--r-- | tests/headers/weird_bitfields.hpp | 1 | ||||
-rwxr-xr-x | tests/test-one.sh | 2 | ||||
-rw-r--r-- | tests/tests.rs | 3 |
7 files changed, 3 insertions, 8 deletions
diff --git a/tests/headers/jsval_layout_opaque.hpp b/tests/headers/jsval_layout_opaque.hpp index 85c5be63..8f36f77d 100644 --- a/tests/headers/jsval_layout_opaque.hpp +++ b/tests/headers/jsval_layout_opaque.hpp @@ -1,4 +1,4 @@ -// bindgen-flags: --no-unstable-rust -- -std=c++11 +// bindgen-flags: -- -std=c++11 /** * These typedefs are hacky, but keep our tests consistent across 64-bit diff --git a/tests/headers/only_bitfields.hpp b/tests/headers/only_bitfields.hpp index 84db0586..793bc66b 100644 --- a/tests/headers/only_bitfields.hpp +++ b/tests/headers/only_bitfields.hpp @@ -1,4 +1,3 @@ -// bindgen-flags: --no-unstable-rust class C { bool a: 1; bool b: 7; diff --git a/tests/headers/struct_with_bitfields.h b/tests/headers/struct_with_bitfields.h index 107fb136..ece512cd 100644 --- a/tests/headers/struct_with_bitfields.h +++ b/tests/headers/struct_with_bitfields.h @@ -1,4 +1,3 @@ -// bindgen-flags: --no-unstable-rust struct bitfield { unsigned short a :1, diff --git a/tests/headers/union_with_anon_struct_bitfield.h b/tests/headers/union_with_anon_struct_bitfield.h index 24c7dce8..9668ce40 100644 --- a/tests/headers/union_with_anon_struct_bitfield.h +++ b/tests/headers/union_with_anon_struct_bitfield.h @@ -1,4 +1,3 @@ -// bindgen-flags: --no-unstable-rust union foo { int a; struct { diff --git a/tests/headers/weird_bitfields.hpp b/tests/headers/weird_bitfields.hpp index 755681c1..68cbf4a5 100644 --- a/tests/headers/weird_bitfields.hpp +++ b/tests/headers/weird_bitfields.hpp @@ -1,4 +1,3 @@ -// bindgen-flags: --no-unstable-rust // You can guess where this is taken from... enum nsStyleSVGOpacitySource { eStyleSVGOpacitySource_Normal, diff --git a/tests/test-one.sh b/tests/test-one.sh index ac466164..16fe1f12 100755 --- a/tests/test-one.sh +++ b/tests/test-one.sh @@ -24,7 +24,7 @@ TEST_BINDINGS_BINARY=$(mktemp -t bindings.XXXXXX) FLAGS="$(grep "// bindgen-flags: " "$TEST" || echo)" FLAGS="${FLAGS/\/\/ bindgen\-flags:/}" # Prepend the default flags added in test.rs's `create_bindgen_builder`. -FLAGS="--no-unstable-rust --with-derive-default --raw-line '' --raw-line '#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]' --raw-line '' $FLAGS" +FLAGS="--with-derive-default --raw-line '' --raw-line '#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]' --raw-line '' $FLAGS" eval ./target/debug/bindgen \ diff --git a/tests/tests.rs b/tests/tests.rs index 46f83155..c1d79954 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -146,7 +146,7 @@ fn create_bindgen_builder(header: &PathBuf) -> Result<Option<Builder>, Error> { .chain(flags.into_iter()); builder_from_flags(args) - .map(|(builder, _, _)| Some(builder.no_unstable_rust())) + .map(|(builder, _, _)| Some(builder)) } macro_rules! test_header { @@ -177,7 +177,6 @@ include!(concat!(env!("OUT_DIR"), "/tests.rs")); fn test_header_contents() { let bindings = builder() .header_contents("test.h", "int foo(const char* a);") - .no_unstable_rust() .generate() .unwrap() .to_string(); |