Skip to content

Commit ae41248

Browse files
committed
Auto merge of #4181 - gilescope:patch-1, r=alexcrichton
Make test less brittle prior to assert_eq failure message format change PR required for rust-lang/rust#42541 to make assert_eq error message be multi-line. Before implementing this we need to make the current test less brittle. Not 100% clear on if I need the final [...] or not.
2 parents 7787741 + 9569106 commit ae41248

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)