diff --git a/library/test/src/test_result.rs b/library/test/src/test_result.rs index c4935f273919e..6f2105795ca26 100644 --- a/library/test/src/test_result.rs +++ b/library/test/src/test_result.rs @@ -16,11 +16,6 @@ pub use self::TestResult::*; // it means. pub const TR_OK: i32 = 50; -// On Windows we use __fastfail to abort, which is documented to use this -// exception code. -#[cfg(windows)] -const STATUS_ABORTED: i32 = 0xC0000409u32 as i32; - #[derive(Debug, Clone, PartialEq)] pub enum TestResult { TrOk, @@ -95,8 +90,10 @@ pub fn get_result_from_exit_code( ) -> TestResult { let result = match status.code() { Some(TR_OK) => TestResult::TrOk, + // On Windows we use __fastfail to abort, which is documented to use this + // exception code. #[cfg(windows)] - Some(STATUS_ABORTED) => TestResult::TrFailed, + Some(0xC0000409) => TestResult::TrFailed, #[cfg(unix)] None => match status.signal() { Some(libc::SIGABRT) => TestResult::TrFailed,