2024-02-16 20:02:50 +00:00
|
|
|
//@ no-prefer-dynamic
|
|
|
|
|
//@ compile-flags: --test -Cpanic=abort -Zpanic-abort-tests=no
|
|
|
|
|
//@ run-flags: --test-threads=1
|
2019-09-19 19:33:38 -07:00
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ needs-unwind
|
2025-01-23 16:36:54 +08:00
|
|
|
//@ needs-subprocess
|
2019-09-19 19:33:38 -07:00
|
|
|
|
|
|
|
|
#![cfg(test)]
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn it_works() {
|
|
|
|
|
assert_eq!(1 + 1, 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
#[should_panic]
|
|
|
|
|
fn it_panics() {
|
|
|
|
|
assert_eq!(1 + 1, 4);
|
|
|
|
|
}
|
2025-03-29 02:41:32 +03:00
|
|
|
|
|
|
|
|
//~? ERROR building tests with panic=abort is not supported without `-Zpanic_abort_tests`
|