summaryrefslogtreecommitdiffstats
path: root/tests/ui/test-attrs/test-should-fail-good-message.rs
blob: 83519c4524a62145d06105023039b43f2666727c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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")
}