You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A function annotated with the `test` attribute that returns `()` can also be
79
-
annotated with the `should_panic` attribute.
78
+
A function annotated with the `test` attribute that returns `()` can also be annotated with the `should_panic` attribute.
80
79
81
80
r[attributes.testing.should_panic.behavior]
82
-
The *`should_panic` attribute*
83
-
makes the test only pass if it actually panics.
81
+
The *`should_panic` attribute* makes the test only pass if it actually panics.
84
82
85
83
r[attributes.testing.should_panic.syntax]
86
-
The `should_panic` attribute may optionally take an input string that must
87
-
appear within the panic message. If the string is not found in the message,
88
-
then the test will fail. The string may be passed using the
89
-
[MetaNameValueStr] syntax or the [MetaListNameValueStr] syntax with an
90
-
`expected` field.
84
+
The `should_panic` attribute may optionally take an input string that must appear within the panic message. If the string is not found in the message, then the test will fail. The string may be passed using the [MetaNameValueStr] syntax or the [MetaListNameValueStr] syntax with an `expected` field.
0 commit comments