Skip to content

Commit

Permalink
Update tests to account for changed #[link_name] attribute emission.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed May 8, 2019
1 parent 187050c commit a4cd80a
Show file tree
Hide file tree
Showing 23 changed files with 0 additions and 42 deletions.
1 change: 0 additions & 1 deletion tests/expectations/tests/bitfield_large_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ fn bindgen_test_layout__bindgen_ty_1() {
);
}
extern "C" {
#[link_name = "\u{1}a"]
pub static mut a: _bindgen_ty_1;
}
2 changes: 0 additions & 2 deletions tests/expectations/tests/class_nested.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ fn bindgen_test_layout_A_C() {
);
}
extern "C" {
#[link_name = "\u{1}var"]
pub static mut var: A_B;
}
#[test]
Expand All @@ -118,7 +117,6 @@ fn __bindgen_test_layout_A_D_open0_int_close0_instantiation() {
);
}
extern "C" {
#[link_name = "\u{1}baz"]
pub static mut baz: A_D<::std::os::raw::c_int>;
}
#[repr(C)]
Expand Down
3 changes: 0 additions & 3 deletions tests/expectations/tests/complex_global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ pub struct __BindgenComplex<T> {
pub im: T,
}
extern "C" {
#[link_name = "\u{1}globalValueFloat"]
pub static mut globalValueFloat: __BindgenComplex<f32>;
}
extern "C" {
#[link_name = "\u{1}globalValueDouble"]
pub static mut globalValueDouble: __BindgenComplex<f64>;
}
extern "C" {
#[link_name = "\u{1}globalValueLongDouble"]
pub static mut globalValueLongDouble: __BindgenComplex<f64>;
}
1 change: 0 additions & 1 deletion tests/expectations/tests/decl_extern_int_twice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@


extern "C" {
#[link_name = "\u{1}foo"]
pub static mut foo: ::std::os::raw::c_int;
}
1 change: 0 additions & 1 deletion tests/expectations/tests/decl_ptr_to_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@


extern "C" {
#[link_name = "\u{1}foo"]
pub static mut foo: *mut [::std::os::raw::c_int; 1usize];
}
1 change: 0 additions & 1 deletion tests/expectations/tests/extern-const-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ impl Default for nsFoo {
}
}
extern "C" {
#[link_name = "\u{1}gDetails"]
pub static gDetails: nsFoo;
}
1 change: 0 additions & 1 deletion tests/expectations/tests/func_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


extern "C" {
#[link_name = "\u{1}foo"]
pub static mut foo:
::std::option::Option<
unsafe extern "C" fn(x: ::std::os::raw::c_int, y: ::std::os::raw::c_int)
Expand Down
4 changes: 0 additions & 4 deletions tests/expectations/tests/issue-511.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
)]

extern "C" {
#[link_name = "\u{1}a"]
pub static mut a: *mut ::std::os::raw::c_char;
}
extern "C" {
#[link_name = "\u{1}b"]
pub static mut b: *const ::std::os::raw::c_char;
}
extern "C" {
#[link_name = "\u{1}c"]
pub static c: *mut ::std::os::raw::c_char;
}
extern "C" {
#[link_name = "\u{1}d"]
pub static d: *const ::std::os::raw::c_char;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ fn bindgen_test_layout__bindgen_ty_1() {
);
}
extern "C" {
#[link_name = "\u{1}AutoIdVector"]
pub static mut AutoIdVector: _bindgen_ty_1;
}
#[test]
Expand Down
12 changes: 0 additions & 12 deletions tests/expectations/tests/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,39 @@


extern "C" {
#[link_name = "\u{1}u8"]
pub static mut u8: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}u16"]
pub static mut u16: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}u32"]
pub static mut u32: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}u64"]
pub static mut u64: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}i8"]
pub static mut i8: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}i16"]
pub static mut i16: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}i32"]
pub static mut i32: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}i64"]
pub static mut i64: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}f32"]
pub static mut f32: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}f64"]
pub static mut f64: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}usize"]
pub static mut usize: ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}isize"]
pub static mut isize: ::std::os::raw::c_int;
}
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion tests/expectations/tests/libclang-3.9/call-conv-field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ fn bindgen_test_layout_JNINativeInterface_() {
);
}
extern "stdcall" {
#[link_name = "\u{1}_bar@0"]
pub fn bar();
}
1 change: 0 additions & 1 deletion tests/expectations/tests/libclang-4/call-conv-field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ fn bindgen_test_layout_JNINativeInterface_() {
);
}
extern "stdcall" {
#[link_name = "\u{1}_bar@0"]
pub fn bar();
}
1 change: 0 additions & 1 deletion tests/expectations/tests/libclang-5/call-conv-field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ fn bindgen_test_layout_JNINativeInterface_() {
);
}
extern "stdcall" {
#[link_name = "\u{1}_bar@0"]
pub fn bar();
}
1 change: 0 additions & 1 deletion tests/expectations/tests/mangling-ios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@


extern "C" {
#[link_name = "\u{1}_foo"]
pub fn foo();
}
1 change: 0 additions & 1 deletion tests/expectations/tests/mangling-macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


extern "C" {
#[link_name = "\u{1}_foo"]
pub fn foo();
}
#[repr(C)]
Expand Down
1 change: 0 additions & 1 deletion tests/expectations/tests/mangling-win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


extern "C" {
#[link_name = "\u{1}_foo"]
pub fn foo();
}
#[repr(C)]
Expand Down
1 change: 0 additions & 1 deletion tests/expectations/tests/objc_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ extern crate objc;
#[allow(non_camel_case_types)]
pub type id = *mut objc::runtime::Object;
extern "C" {
#[link_name = "\u{1}fooVar"]
pub static mut fooVar: *mut id;
}
pub trait Foo {
Expand Down
1 change: 0 additions & 1 deletion tests/expectations/tests/objc_interface_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ extern "C" {
pub fn fooFunc(foo: id);
}
extern "C" {
#[link_name = "\u{1}kFoo"]
pub static mut kFoo: *const id;
}
2 changes: 0 additions & 2 deletions tests/expectations/tests/objc_sel_and_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ extern crate objc;
#[allow(non_camel_case_types)]
pub type id = *mut objc::runtime::Object;
extern "C" {
#[link_name = "\u{1}object"]
pub static mut object: id;
}
extern "C" {
#[link_name = "\u{1}selector"]
pub static mut selector: objc::runtime::Sel;
}
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* automatically generated by rust-bindgen */

extern "C" {
#[link_name = "\u{1}foo"]
pub static mut foo:
::std::option::Option<
unsafe extern "C" fn(x: ::std::os::raw::c_int, y: ::std::os::raw::c_int)
Expand Down
1 change: 0 additions & 1 deletion tests/expectations/tests/use-core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ impl Default for _bindgen_ty_1 {
}
}
extern "C" {
#[link_name = "\u{1}bazz"]
pub static mut bazz: _bindgen_ty_1;
}
pub type fooFunction = ::core::option::Option<unsafe extern "C" fn(bar: ::std::os::raw::c_int)>;
1 change: 0 additions & 1 deletion tests/expectations/tests/use-core_1_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ impl Clone for _bindgen_ty_1 {
}
}
extern "C" {
#[link_name = "\u{1}bazz"]
pub static mut bazz: _bindgen_ty_1;
}
pub type fooFunction = ::core::option::Option<unsafe extern "C" fn(bar: ::std::os::raw::c_int)>;
2 changes: 0 additions & 2 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,9 @@ fn test_clang_env_args() {
let (expected, _) = rustfmt("/* automatically generated by rust-bindgen */
extern \"C\" {
#[link_name = \"\\u{1}x\"]
pub static mut x: [::std::os::raw::c_int; 1usize];
}
extern \"C\" {
#[link_name = \"\\u{1}y\"]
pub static mut y: [::std::os::raw::c_int; 1usize];
}
".to_string());
Expand Down

0 comments on commit a4cd80a

Please sign in to comment.