]> git.lizzy.rs Git - rust.git/blob - src/test/ui/test-attrs/test-should-fail-good-message.rs
Rollup merge of #65832 - tlively:emscripten-exception-handling, r=alexcrichton
[rust.git] / src / test / ui / test-attrs / test-should-fail-good-message.rs
1 // run-pass
2 // ignore-wasm32-bare compiled with panic=abort by default
3 // compile-flags: --test
4 #[test]
5 #[should_panic(expected = "foo")]
6 pub fn test_foo() {
7     panic!("foo bar")
8 }
9
10 #[test]
11 #[should_panic(expected = "foo")]
12 pub fn test_foo_dynamic() {
13     panic!("{} bar", "foo")
14 }