Macro test::assert_terminates
Assert that the inner block abnormally terminates the process.
The inner block is executed in a forked process. If the block runs to completion, the macro will panic.
Example
use test::assert_terminates;
#[test]
fn test_trap() {
assert_terminates({
std::intrinsics::trap();
});
}
Run this example