Skip to content

Commit 6bc2fb4

Browse files
authored
Make test less brittle prior to assert_eq failure message format change
PR #42541 on Rust is to make assert_eq error message be multi-line. Before implementing this we need to make the current test less brittle.
1 parent b4b7ed5 commit 6bc2fb4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/bench.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ fn cargo_bench_failing_test() {
242242
[FINISHED] release [optimized] target(s) in [..]
243243
[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]
244244
thread '[..]' panicked at 'assertion failed: \
245-
`(left == right)` (left: \
246-
`\"hello\"`, right: `\"nope\"`)', src[/]foo.rs:14
247-
[..]
248-
", p.url()))
245+
`(left == right)`", p.url()))
246+
.with_stderr_contains("left: `\"hello\"`")
247+
.with_stderr_contains("right: `\"nope\"`")
248+
.with_stderr_contains("src[/]foo.rs:14")
249249
.with_status(101));
250250
}
251251

0 commit comments

Comments
 (0)