Commit 7fbe8d5
committed
Improve output when
Output before:
---- foo stdout ----
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'foo' panicked at 'assertion failed: `(left == right)`
left: `1`,
right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', src/libtest/lib.rs:335:5
Output with this commit:
---- foo stdout ----
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'foo' panicked at 'the test returned a termination value with a non-zero status code (1) which indicates a failure (this most likely means your test returned an `Err(_)`)', src/libtest/lib.rs:336:9
It's still by no means perfect. But it's already way better since
there is no strange left/right 0/1 output (I regularly got confused
by that output and searched for a failing `assert_eq` in my code)#[test] returns an Err(_) value1 parent 070cebd commit 7fbe8d5
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| |||
0 commit comments