2019-08-26 23:07:26 +00:00
|
|
|
//@ run-pass
|
2018-03-11 02:16:26 +00:00
|
|
|
//@ aux-build:test-macros.rs
|
|
|
|
|
2019-05-21 22:09:58 +00:00
|
|
|
#[macro_use]
|
2018-03-11 02:16:26 +00:00
|
|
|
extern crate test_macros;
|
|
|
|
|
|
|
|
fn main() {
|
2019-08-26 23:07:26 +00:00
|
|
|
assert_eq!(unsafe { rust_get_test_int() }, 1);
|
2018-03-11 02:16:26 +00:00
|
|
|
assert_eq!(unsafe { rust_dbg_extern_identity_u32(0xDEADBEEF) }, 0xDEADBEEF);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[link(name = "rust_test_helpers", kind = "static")]
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2019-05-21 22:09:58 +00:00
|
|
|
#[empty_attr]
|
2018-03-11 02:16:26 +00:00
|
|
|
fn some_definitely_unknown_symbol_which_should_be_removed();
|
|
|
|
|
2019-05-21 22:09:58 +00:00
|
|
|
#[identity_attr]
|
2018-03-11 02:16:26 +00:00
|
|
|
fn rust_get_test_int() -> isize;
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
identity!(
|
|
|
|
fn rust_dbg_extern_identity_u32(arg: u32) -> u32;
|
|
|
|
);
|
2018-03-11 02:16:26 +00:00
|
|
|
}
|