rust/src/test/run-pass/x86stdcall.rs
Brian Anderson ad1c0e6308 Reformulate x86stdcall test so it works with check-fast
Hopefully this puts out the burning win32 tinderbox
2011-07-18 14:59:44 -07:00

20 lines
383 B
Rust

// xfail-stage0
#[cfg(target_os = "win32")]
native "x86stdcall" mod kernel32 {
fn SetLastError(uint err);
fn GetLastError() -> uint;
}
#[cfg(target_os = "win32")]
fn main() {
auto expected = 10u;
kernel32::SetLastError(expected);
auto actual = kernel32::GetLastError();
assert expected == actual;
}
#[cfg(target_os = "macos")]
#[cfg(target_os = "linux")]
fn main() {
}