rust/tests/ui/abi/extern/extern-pass-double.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
252 B
Rust
Raw Normal View History

//@ run-pass
2016-11-24 00:09:51 +00:00
#[link(name = "rust_test_helpers", kind = "static")]
2020-09-01 21:12:52 +00:00
extern "C" {
pub fn rust_dbg_extern_identity_double(v: f64) -> f64;
}
pub fn main() {
unsafe {
assert_eq!(22.0_f64, rust_dbg_extern_identity_double(22.0_f64));
}
}