only print diff in example_test if test.v is set
This commit is contained in:
@@ -61,6 +61,9 @@ func TestRunExample(t *testing.T) {
|
||||
got := strings.TrimSpace(string(out))
|
||||
want := "benjaminjkraft is Ben Kraft created on 2009-08-03"
|
||||
if got != want {
|
||||
t.Errorf("output incorrect\ngot:\n%s\nwant:\n%s", got, want)
|
||||
t.Errorf("output incorrect")
|
||||
if testing.Verbose() {
|
||||
t.Errorf("got:\n%s\nwant:\n%s", got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user