File tree 3 files changed +10
-11
lines changed
3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -61,16 +61,15 @@ pub(crate) fn calc_result(
61
61
} else if let Some ( panic_str) = maybe_panic_str {
62
62
TestResult :: TrFailedMsg ( format ! (
63
63
r#"panic did not contain expected string
64
- panic message: ` {panic_str:?}`,
65
- expected substring: ` {msg:?}` "#
64
+ panic message: {panic_str:?}
65
+ expected substring: {msg:?}"#
66
66
) )
67
67
} else {
68
68
TestResult :: TrFailedMsg ( format ! (
69
69
r#"expected panic with string value,
70
70
found non-string value: `{:?}`
71
- expected substring: `{:?}`"# ,
72
- ( * err) . type_id( ) ,
73
- msg
71
+ expected substring: {msg:?}"# ,
72
+ ( * err) . type_id( )
74
73
) )
75
74
}
76
75
}
Original file line number Diff line number Diff line change @@ -200,8 +200,8 @@ fn test_should_panic_bad_message() {
200
200
}
201
201
let expected = "foobar" ;
202
202
let failed_msg = r#"panic did not contain expected string
203
- panic message: ` "an error message"`,
204
- expected substring: ` "foobar"` "# ;
203
+ panic message: "an error message"
204
+ expected substring: "foobar""# ;
205
205
let desc = TestDescAndFn {
206
206
desc : TestDesc {
207
207
name : StaticTestName ( "whatever" ) ,
@@ -238,7 +238,7 @@ fn test_should_panic_non_string_message_type() {
238
238
let failed_msg = format ! (
239
239
r#"expected panic with string value,
240
240
found non-string value: `{:?}`
241
- expected substring: ` "foobar"` "# ,
241
+ expected substring: "foobar""# ,
242
242
TypeId :: of:: <i32 >( )
243
243
) ;
244
244
let desc = TestDescAndFn {
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.
15
15
note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:31:4
16
16
---- should_panic_with_substring_panics_with_incorrect_string stdout ----
17
17
note: panic did not contain expected string
18
- panic message: ` "ZOMGWTFBBQ"`,
19
- expected substring: ` "message"`
18
+ panic message: "ZOMGWTFBBQ"
19
+ expected substring: "message"
20
20
---- should_panic_with_substring_panics_with_non_string_value stdout ----
21
21
note: expected panic with string value,
22
22
found non-string value: `TypeId($HEX)`
23
- expected substring: ` "message"`
23
+ expected substring: "message"
24
24
25
25
failures:
26
26
should_panic_with_any_message_does_not_panic
You can’t perform that action at this time.
0 commit comments