also test non-string panic payload
This commit is contained in:
parent
ee411c2a74
commit
35e1fe1665
@ -47,6 +47,7 @@ fn main() {
|
||||
test(|_old_val| panic!("Hello from panic: std"));
|
||||
test(|old_val| panic!(format!("Hello from panic: {:?}", old_val)));
|
||||
test(|old_val| panic!("Hello from panic: {:?}", old_val));
|
||||
test(|_old_val| panic!(1337));
|
||||
// FIXME https://github.com/rust-lang/miri/issues/1071
|
||||
//test(|_old_val| core::panic!("Hello from panic: core"));
|
||||
//test(|old_val| core::panic!(&format!("Hello from panic: {:?}", old_val)));
|
||||
|
@ -4,4 +4,6 @@ thread 'main' panicked at 'Hello from panic: 1', $DIR/catch_panic.rs:48:20
|
||||
Caught panic message (String): Hello from panic: 1
|
||||
thread 'main' panicked at 'Hello from panic: 2', $DIR/catch_panic.rs:49:20
|
||||
Caught panic message (String): Hello from panic: 2
|
||||
thread 'main' panicked at 'Box<Any>', $DIR/catch_panic.rs:50:21
|
||||
Failed get caught panic message.
|
||||
Success!
|
||||
|
Loading…
x
Reference in New Issue
Block a user