Skip to content

Commit

Permalink
only show allowed failure count if there are allowed failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Woolcock committed Jun 25, 2017
1 parent 8edc3ca commit 4154f89
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,14 +789,24 @@ impl<T: Write> ConsoleTestState<T> {
} else {
self.write_pretty("FAILED", term::color::RED)?;
}
let s = format!(
let s = if self.allowed_fail > 0 {
format!(
". {} passed; {} failed ({} allowed); {} ignored; {} measured; {} filtered out\n\n",
self.passed,
self.failed,
self.failed + self.allowed_fail,
self.allowed_fail,
self.ignored,
self.measured,
self.filtered_out);
self.filtered_out)
} else {
format!(
". {} passed; {} failed; {} ignored; {} measured; {} filtered out\n\n",
self.passed,
self.failed,
self.ignored,
self.measured,
self.filtered_out)
};
self.write_plain(&s)?;
return Ok(success);
}
Expand Down

0 comments on commit 4154f89

Please sign in to comment.