diff options
| author | Leah Hanson <astrieanna@gmail.com> | 2013-11-08 10:59:37 -0600 |
|---|---|---|
| committer | Leah Hanson <leah.a.hanson@gmail.com> | 2013-11-17 20:55:59 -0600 |
| commit | 69768f7c9458f166d2549c0d60d66a4087a3adc3 (patch) | |
| tree | bf79d7bf66e9a2d7be150c48d65f5c911111576e | |
| parent | 3851f908d16b55dfe69d5a423ecbef4cd224fae2 (diff) | |
| download | rust-69768f7c9458f166d2549c0d60d66a4087a3adc3.tar.gz rust-69768f7c9458f166d2549c0d60d66a4087a3adc3.zip | |
Fix XFailed test x86stdcall
There was a syntax error because the `extern "stdcall"` was outside the module instead of inside it. * moved `extern` inside module * change `extern "stdcall"` to `extern "system"` * change `cfg(target_os="win32")` to `cfg(windows)` * updated copyright dates * changed log(error, ...) => info!(....) * added `pub` keyword to kernel32 functions
| -rw-r--r-- | src/test/run-pass/x86stdcall.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs index f584237d0de..21e970e3c87 100644 --- a/src/test/run-pass/x86stdcall.rs +++ b/src/test/run-pass/x86stdcall.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -9,22 +9,23 @@ // except according to those terms. // GetLastError doesn't seem to work with stack switching -// xfail-test -#[cfg(target_os = "win32")] -extern "stdcall" mod kernel32 { - fn SetLastError(err: uint); - fn GetLastError() -> uint; +#[cfg(windows)] +mod kernel32 { + extern "system" { + pub fn SetLastError(err: uint); + pub fn GetLastError() -> uint; + } } -#[cfg(target_os = "win32")] +#[cfg(windows)] pub fn main() { unsafe { let expected = 1234u; kernel32::SetLastError(expected); let actual = kernel32::GetLastError(); - log(error, actual); + info!("actual = {}", actual); assert_eq!(expected, actual); } } |
