Reformulate x86stdcall test so it works with check-fast
Hopefully this puts out the burning win32 tinderbox
This commit is contained in:
parent
b78eee8732
commit
ad1c0e6308
1 changed files with 10 additions and 11 deletions
|
@ -1,18 +1,17 @@
|
||||||
// xfail-stage0
|
// xfail-stage0
|
||||||
|
|
||||||
#[cfg(target_os = "win32")]
|
#[cfg(target_os = "win32")]
|
||||||
mod m {
|
native "x86stdcall" mod kernel32 {
|
||||||
native "x86stdcall" mod kernel32 {
|
fn SetLastError(uint err);
|
||||||
fn SetLastError(uint err);
|
fn GetLastError() -> uint;
|
||||||
fn GetLastError() -> uint;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
#[cfg(target_os = "win32")]
|
||||||
auto expected = 10u;
|
fn main() {
|
||||||
kernel32::SetLastError(expected);
|
auto expected = 10u;
|
||||||
auto actual = kernel32::GetLastError();
|
kernel32::SetLastError(expected);
|
||||||
assert expected == actual;
|
auto actual = kernel32::GetLastError();
|
||||||
}
|
assert expected == actual;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue