PrintSummary prints summary
(result runtime.Result)
| 65 | |
| 66 | // PrintSummary prints summary |
| 67 | func (w *OutputWriter) PrintSummary(result runtime.Result) bool { |
| 68 | if result.Failed > 0 { |
| 69 | w.printFailures(result.TestResults) |
| 70 | } |
| 71 | |
| 72 | w.fprintf("") |
| 73 | w.fprintf(w.template.duration(result)) |
| 74 | summary := w.template.summary(result) |
| 75 | if result.Failed > 0 { |
| 76 | w.fprintf(w.au.Red(summary)) |
| 77 | } else { |
| 78 | w.fprintf(w.au.Green(summary)) |
| 79 | } |
| 80 | |
| 81 | return result.Failed == 0 |
| 82 | } |
| 83 | |
| 84 | // printResult prints the simple output form of a TestReault |
| 85 | func (w *OutputWriter) printResult(r TestResult) { |