panic ui test: Add a test for panic::always_abort
Our existing tests are only on Unix. We want a general one too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
parent
19429ce132
commit
12fe50010d
@ -43,10 +43,17 @@ fn testrust() {
|
||||
should_have_aborted();
|
||||
}
|
||||
|
||||
fn test_always_abort() {
|
||||
panic::always_abort();
|
||||
let _ = panic::catch_unwind(|| { panic!(); });
|
||||
should_have_aborted();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let tests: &[(_, fn())] = &[
|
||||
("test", test),
|
||||
("testrust", testrust),
|
||||
("test_always_abort", test_always_abort),
|
||||
];
|
||||
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
Loading…
Reference in New Issue
Block a user