From 67d937337f43d9b5451705bc3fc532ae5f7b83c5 Mon Sep 17 00:00:00 2001 From: Siddharth Koli Date: Sat, 21 Dec 2024 22:56:51 +0530 Subject: [PATCH] Replace with helper function call Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com> --- pkg/reporter/stdout_reporter.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/reporter/stdout_reporter.go b/pkg/reporter/stdout_reporter.go index e770199..fbcaea0 100644 --- a/pkg/reporter/stdout_reporter.go +++ b/pkg/reporter/stdout_reporter.go @@ -50,7 +50,7 @@ func PrintSingleGroupStdout(groupReport map[string][]Report) error { totalSuccessCount += stdoutReport.Summary.Passed totalFailureCount += stdoutReport.Summary.Failed fmt.Println(stdoutReport.Text) - if group != "Passed" && group != "Failed" { + if checkGroupsForPassFail(group) { fmt.Printf("Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed) } } @@ -72,7 +72,7 @@ func PrintDoubleGroupStdout(groupReport map[string]map[string][]Report) error { totalSuccessCount += stdoutReport.Summary.Passed totalFailureCount += stdoutReport.Summary.Failed fmt.Println(stdoutReport.Text) - if group != "Passed" && group != "Failed" && group2 != "Passed" && group2 != "Failed" { + if checkGroupsForPassFail(group, group2) { fmt.Printf(" Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed) } } @@ -98,7 +98,7 @@ func PrintTripleGroupStdout(groupReport map[string]map[string]map[string][]Repor totalSuccessCount += stdoutReport.Summary.Passed totalFailureCount += stdoutReport.Summary.Failed fmt.Println(stdoutReport.Text) - if groupOne != "Passed" && groupOne != "Failed" && groupTwo != "Passed" && groupTwo != "Failed" && groupThree != "Passed" && groupThree != "Failed" { + if checkGroupsForPassFail(groupOne, groupTwo, groupThree) { fmt.Printf(" Summary: %d succeeded, %d failed\n\n", stdoutReport.Summary.Passed, stdoutReport.Summary.Failed) } }