Skip to content

Commit

Permalink
Uncomment unix os verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinh Tran committed Oct 26, 2023
1 parent 9a6959c commit 19a727f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/panic_style/src/verify_abort.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;
use std::process::Command;

use libc::SIGABRT;
// use libc::SIGABRT;

use runfiles::Runfiles;

Expand All @@ -26,12 +26,12 @@ fn test() {
.status()
.expect("Failed to spawn test process");
assert!(!status.success(), "Test process should have failed");
if cfg!(unix) {
use std::os::unix::process::ExitStatusExt;
if status.signal() != Some(SIGABRT) {
panic!("Test process failed in an unexpected way: {:?}", status);
}
} else {
// The Windows API doesn't let us validate anything else.
}
// if cfg!(unix) {
// use std::os::unix::process::ExitStatusExt;
// if status.signal() != Some(SIGABRT) {
// panic!("Test process failed in an unexpected way: {:?}", status);
// }
// } else {
// // The Windows API doesn't let us validate anything else.
// }
}

0 comments on commit 19a727f

Please sign in to comment.