mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
15 lines
240 B
Rust
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")
|
|
}
|