From: Squirrel Date: Fri, 16 Jun 2017 18:20:41 +0000 (+0100) Subject: Make test less brittle prior to assert_eq failure message format change X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~8^2~33^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6bc2fb4b8e0bccac8be2d35783f00d79d033f543;p=cargo.git 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. --- diff --git a/tests/bench.rs b/tests/bench.rs index d589f234b..e289f62fb 100644 --- a/tests/bench.rs +++ b/tests/bench.rs @@ -242,10 +242,10 @@ fn cargo_bench_failing_test() { [FINISHED] release [optimized] target(s) in [..] [RUNNING] target[/]release[/]deps[/]foo-[..][EXE] thread '[..]' panicked at 'assertion failed: \ - `(left == right)` (left: \ - `\"hello\"`, right: `\"nope\"`)', src[/]foo.rs:14 -[..] -", p.url())) + `(left == right)`", p.url())) + .with_stderr_contains("left: `\"hello\"`") + .with_stderr_contains("right: `\"nope\"`") + .with_stderr_contains("src[/]foo.rs:14") .with_status(101)); }