Skip to content

Commit 260afbc

Browse files
Improve readability for error in TestPrintDefaults
1 parent 484badb commit 260afbc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

flag_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,9 +1247,7 @@ func TestPrintDefaults(t *testing.T) {
12471247
fs.PrintDefaults()
12481248
got := buf.String()
12491249
if got != defaultOutput {
1250-
fmt.Println("\n" + got)
1251-
fmt.Printf("\n" + defaultOutput)
1252-
t.Errorf("got %q want %q\n", got, defaultOutput)
1250+
t.Errorf("\n--- Got:\n%s--- Wanted:\n%s\n", got, defaultOutput)
12531251
}
12541252
}
12551253

0 commit comments

Comments
 (0)