MCPcopy Create free account
hub / github.com/commander-cli/commander / PrintSummary

Method PrintSummary

pkg/output/cli.go:67–82  ·  view source on GitHub ↗

PrintSummary prints summary

(result runtime.Result)

Source from the content-addressed store, hash-verified

65
66// PrintSummary prints summary
67func (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
85func (w *OutputWriter) printResult(r TestResult) {

Callers 2

Test_PrintSummaryFunction · 0.80
TestCommandFunction · 0.80

Calls 4

printFailuresMethod · 0.95
fprintfMethod · 0.95
durationMethod · 0.80
summaryMethod · 0.80

Tested by 2

Test_PrintSummaryFunction · 0.64
TestCommandFunction · 0.64