Skip to content

Commit 46ff5ff

Browse files
committed
Move comment for Windows-only constant into the match arm section
1 parent 3bd708e commit 46ff5ff

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

library/test/src/test_result.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ pub use self::TestResult::*;
1616
// it means.
1717
pub const TR_OK: i32 = 50;
1818

19-
// On Windows we use __fastfail to abort, which is documented to use this
20-
// exception code.
21-
#[cfg(windows)]
22-
const STATUS_ABORTED: i32 = 0xC0000409u32 as i32;
23-
2419
#[derive(Debug, Clone, PartialEq)]
2520
pub enum TestResult {
2621
TrOk,
@@ -95,8 +90,10 @@ pub fn get_result_from_exit_code(
9590
) -> TestResult {
9691
let result = match status.code() {
9792
Some(TR_OK) => TestResult::TrOk,
93+
// On Windows we use __fastfail to abort, which is documented to use this
94+
// exception code.
9895
#[cfg(windows)]
99-
Some(STATUS_ABORTED) => TestResult::TrFailed,
96+
Some(0xC0000409) => TestResult::TrFailed,
10097
#[cfg(unix)]
10198
None => match status.signal() {
10299
Some(libc::SIGABRT) => TestResult::TrFailed,

0 commit comments

Comments
 (0)