diff options
Diffstat (limited to 'tests/ui/abi/extern/extern-pass-double.rs')
-rw-r--r-- | tests/ui/abi/extern/extern-pass-double.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/abi/extern/extern-pass-double.rs b/tests/ui/abi/extern/extern-pass-double.rs new file mode 100644 index 000000000..0b556c99e --- /dev/null +++ b/tests/ui/abi/extern/extern-pass-double.rs @@ -0,0 +1,13 @@ +// run-pass +// ignore-wasm32-bare no libc for ffi testing + +#[link(name = "rust_test_helpers", kind = "static")] +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)); + } +} |