summaryrefslogtreecommitdiffstats
path: root/src/test/ui/test-attrs/test-should-fail-good-message.rs
blob: 3260b6938f07db0de3dc234c7be29f106c584165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass
// needs-unwind
// ignore-wasm32-bare compiled with panic=abort by default
// 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")
}