]> git.lizzy.rs Git - rust.git/blob - src/test/ui/test-should-panic-attr.rs
Auto merge of #56827 - faern:eliminate-recv-timeout-panic, r=KodrAus
[rust.git] / src / test / ui / test-should-panic-attr.rs
1 // run-pass
2 // compile-flags: --test
3
4 #[test]
5 #[should_panic = "foo"]
6 //~^ WARN: attribute must be of the form:
7 fn test1() {
8     panic!();
9 }
10
11 #[test]
12 #[should_panic(expected)]
13 //~^ WARN: argument must be of the form:
14 fn test2() {
15     panic!();
16 }
17
18 #[test]
19 #[should_panic(expect)]
20 //~^ WARN: argument must be of the form:
21 fn test3() {
22     panic!();
23 }
24
25 #[test]
26 #[should_panic(expected(foo, bar))]
27 //~^ WARN: argument must be of the form:
28 fn test4() {
29     panic!();
30 }
31
32 #[test]
33 #[should_panic(expected = "foo", bar)]
34 //~^ WARN: argument must be of the form:
35 fn test5() {
36     panic!();
37 }