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