self.write_short_result("FAILED", term::color::RED)
}
- pub fn write_ignored(&mut self) -> io::Result<()> {
- self.write_short_result("ignored", term::color::YELLOW)
+ pub fn write_ignored(&mut self, message: Option<&'static str>) -> io::Result<()> {
+ if let Some(message) = message {
+ self.write_short_result(&format!("ignored, {}", message), term::color::YELLOW)
+ } else {
+ self.write_short_result("ignored", term::color::YELLOW)
+ }
}
pub fn write_time_failed(&mut self) -> io::Result<()> {
match *result {
TestResult::TrOk => self.write_ok()?,
TestResult::TrFailed | TestResult::TrFailedMsg(_) => self.write_failed()?,
- TestResult::TrIgnored => self.write_ignored()?,
+ TestResult::TrIgnored => self.write_ignored(desc.ignore_message)?,
TestResult::TrBench(ref bs) => {
self.write_bench()?;
self.write_plain(&format!(": {}", fmt_bench_samples(bs)))?;