Files
rust/tests/ui/test-attrs/test-should-fail-good-message.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
243 B
Rust
Raw Normal View History

//@ run-pass
//@ needs-unwind
//@ compile-flags: --test
#[test]
#[should_panic(expected = "foo")]
2015-03-16 09:00:41 +13:00
pub fn test_foo() {
panic!("foo bar")
}
#[test]
#[should_panic(expected = "foo")]
2015-03-16 09:00:41 +13:00
pub fn test_foo_dynamic() {
panic!("{} bar", "foo")
}