make test failure code more succinct

This commit is contained in:
Jared Wasinger 2025-04-02 23:14:07 +02:00
parent 1a700027ce
commit f464eb4e78

View file

@ -61,10 +61,7 @@ func TestLogging(t *testing.T) {
mock := mockT{&outp} mock := mockT{&outp}
tc.run(&mock) tc.run(&mock)
if outp.String() != tc.expected { if outp.String() != tc.expected {
fmt.Println("mismatch") fmt.Printf("output mismatch.\nwant: '%s'\ngot: '%s'\n", tc.expected, outp.String())
fmt.Printf("'%s'\n", outp.String())
fmt.Println("----")
fmt.Printf("'%s'\n", tc.expected)
} }
} }
} }