summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-02-14 20:45:15 +0100
committerGitHub <noreply@github.com>2018-02-14 20:45:15 +0100
commit3379a90a2d88c7d6333d64fe33ea1bd992904c71 (patch)
treeaaa7fb15b9216c015afdbb8ae1690ca57535d59c /tests
parent8c5f862f828b1f85eb29a4159c0f9237ac473fbf (diff)
parentad6b2231924da983ad818068413c61979bf95ac7 (diff)
Merge pull request #1256 from fitzgen/fix-missing-dylibs. r=emilio
Fix missing dylibs
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/tests/comment-indent.rs3
-rw-r--r--tests/expectations/tests/derive-bitfield-method-same-name.rs3
-rw-r--r--tests/expectations/tests/libclang-3.9/constant-evaluate.rs2
-rw-r--r--tests/expectations/tests/libclang-4/constant-evaluate.rs2
-rw-r--r--tests/expectations/tests/objc_class_method.rs13
-rw-r--r--tests/expectations/tests/objc_method_clash.rs3
-rw-r--r--tests/expectations/tests/objc_whitelist.rs5
7 files changed, 20 insertions, 11 deletions
diff --git a/tests/expectations/tests/comment-indent.rs b/tests/expectations/tests/comment-indent.rs
index a7705d4b..f00b0235 100644
--- a/tests/expectations/tests/comment-indent.rs
+++ b/tests/expectations/tests/comment-indent.rs
@@ -1,7 +1,9 @@
/* automatically generated by rust-bindgen */
+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+
#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
pub mod root {
#[allow(unused_imports)]
@@ -109,6 +111,7 @@ pub mod root {
concat!("Alignment of ", stringify!(InInlineNS))
);
}
+
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Bazz {
diff --git a/tests/expectations/tests/derive-bitfield-method-same-name.rs b/tests/expectations/tests/derive-bitfield-method-same-name.rs
index 3bce0ff1..d105c586 100644
--- a/tests/expectations/tests/derive-bitfield-method-same-name.rs
+++ b/tests/expectations/tests/derive-bitfield-method-same-name.rs
@@ -1,7 +1,9 @@
/* automatically generated by rust-bindgen */
+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align>
@@ -81,6 +83,7 @@ where
}
}
}
+
/// Because this struct have array larger than 32 items
/// and --with-derive-partialeq --impl-partialeq --impl-debug is provided,
/// this struct should manually implement `Debug` and `PartialEq`.
diff --git a/tests/expectations/tests/libclang-3.9/constant-evaluate.rs b/tests/expectations/tests/libclang-3.9/constant-evaluate.rs
index 159dba7c..096bc182 100644
--- a/tests/expectations/tests/libclang-3.9/constant-evaluate.rs
+++ b/tests/expectations/tests/libclang-3.9/constant-evaluate.rs
@@ -16,7 +16,7 @@ pub type EasyToOverflow = ::std::os::raw::c_ulonglong;
pub const k: EasyToOverflow = 2147483648;
pub const k_expr: EasyToOverflow = 0;
pub const BAZ: ::std::os::raw::c_longlong = 24;
-pub const fuzz: f64 = 51.0;
+pub const fuzz: f64 = 51.;
pub const BAZZ: ::std::os::raw::c_char = 53;
pub const WAT: ::std::os::raw::c_char = 0;
pub const bytestring: &'static [u8; 4usize] = b"Foo\0";
diff --git a/tests/expectations/tests/libclang-4/constant-evaluate.rs b/tests/expectations/tests/libclang-4/constant-evaluate.rs
index 045710f9..51365df5 100644
--- a/tests/expectations/tests/libclang-4/constant-evaluate.rs
+++ b/tests/expectations/tests/libclang-4/constant-evaluate.rs
@@ -14,7 +14,7 @@ pub type EasyToOverflow = ::std::os::raw::c_ulonglong;
pub const k: EasyToOverflow = 2147483648;
pub const k_expr: EasyToOverflow = 0;
pub const BAZ: ::std::os::raw::c_longlong = 24;
-pub const fuzz: f64 = 51.0;
+pub const fuzz: f64 = 51.;
pub const BAZZ: ::std::os::raw::c_char = 53;
pub const WAT: ::std::os::raw::c_char = 0;
pub const bytestring: &'static [u8; 4usize] = b"Foo\0";
diff --git a/tests/expectations/tests/objc_class_method.rs b/tests/expectations/tests/objc_class_method.rs
index 2c5a326d..a10a1fca 100644
--- a/tests/expectations/tests/objc_class_method.rs
+++ b/tests/expectations/tests/objc_class_method.rs
@@ -1,5 +1,6 @@
/* automatically generated by rust-bindgen */
+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
#![cfg(target_os = "macos")]
@@ -22,31 +23,31 @@ pub trait Foo {
impl Foo for id {
unsafe fn method() {
msg_send!(
- objc::runtime::Class::get("Foo").expect("Couldn\'t find Foo"),
+ objc::runtime::Class::get("Foo").expect("Couldn't find Foo"),
method
)
}
unsafe fn methodWithInt_(foo: ::std::os::raw::c_int) {
msg_send!(
- objc::runtime::Class::get("Foo").expect("Couldn\'t find Foo"),
+ objc::runtime::Class::get("Foo").expect("Couldn't find Foo"),
methodWithInt: foo
)
}
unsafe fn methodWithFoo_(foo: id) {
msg_send!(
- objc::runtime::Class::get("Foo").expect("Couldn\'t find Foo"),
+ objc::runtime::Class::get("Foo").expect("Couldn't find Foo"),
methodWithFoo: foo
)
}
unsafe fn methodReturningInt() -> ::std::os::raw::c_int {
msg_send!(
- objc::runtime::Class::get("Foo").expect("Couldn\'t find Foo"),
+ objc::runtime::Class::get("Foo").expect("Couldn't find Foo"),
methodReturningInt
)
}
unsafe fn methodReturningFoo() -> *mut id {
msg_send!(
- objc::runtime::Class::get("Foo").expect("Couldn\'t find Foo"),
+ objc::runtime::Class::get("Foo").expect("Couldn't find Foo"),
methodReturningFoo
)
}
@@ -55,6 +56,6 @@ impl Foo for id {
ptr: *mut ::std::os::raw::c_char,
floatvalue: f32,
) {
- msg_send ! ( objc :: runtime :: Class :: get ( "Foo" ) . expect ( "Couldn\'t find Foo" ) , methodWithArg1 : intvalue andArg2 : ptr andArg3 : floatvalue )
+ msg_send ! ( objc :: runtime :: Class :: get ( "Foo" ) . expect ( "Couldn't find Foo" ) , methodWithArg1 : intvalue andArg2 : ptr andArg3 : floatvalue )
}
}
diff --git a/tests/expectations/tests/objc_method_clash.rs b/tests/expectations/tests/objc_method_clash.rs
index 158a0443..f57951b4 100644
--- a/tests/expectations/tests/objc_method_clash.rs
+++ b/tests/expectations/tests/objc_method_clash.rs
@@ -1,5 +1,6 @@
/* automatically generated by rust-bindgen */
+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
#![cfg(target_os = "macos")]
@@ -17,7 +18,7 @@ impl Foo for id {
}
unsafe fn class_foo() {
msg_send!(
- objc::runtime::Class::get("Foo").expect("Couldn\'t find Foo"),
+ objc::runtime::Class::get("Foo").expect("Couldn't find Foo"),
foo
)
}
diff --git a/tests/expectations/tests/objc_whitelist.rs b/tests/expectations/tests/objc_whitelist.rs
index 7a6e20fc..38881ad0 100644
--- a/tests/expectations/tests/objc_whitelist.rs
+++ b/tests/expectations/tests/objc_whitelist.rs
@@ -1,5 +1,6 @@
/* automatically generated by rust-bindgen */
+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
#![cfg(target_os = "macos")]
@@ -17,7 +18,7 @@ impl protocol_SomeProtocol for id {
}
unsafe fn protocolClassMethod() {
msg_send!(
- objc::runtime::Class::get("SomeProtocol").expect("Couldn\'t find SomeProtocol"),
+ objc::runtime::Class::get("SomeProtocol").expect("Couldn't find SomeProtocol"),
protocolClassMethod
)
}
@@ -32,7 +33,7 @@ impl WhitelistMe for id {
}
unsafe fn classMethod() {
msg_send!(
- objc::runtime::Class::get("WhitelistMe").expect("Couldn\'t find WhitelistMe"),
+ objc::runtime::Class::get("WhitelistMe").expect("Couldn't find WhitelistMe"),
classMethod
)
}