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
240 B
Rust
Raw Normal View History

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