rust/tests/ui/test-attrs/test-should-fail-good-message.rs
2023-01-11 09:32:08 +00:00

15 lines
240 B
Rust

// run-pass
// needs-unwind
// compile-flags: --test
#[test]
#[should_panic(expected = "foo")]
pub fn test_foo() {
panic!("foo bar")
}
#[test]
#[should_panic(expected = "foo")]
pub fn test_foo_dynamic() {
panic!("{} bar", "foo")
}