Skip to content

Commit

Permalink
avoid double failed when msg has failed in it like it is likely to have
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Nov 6, 2022
1 parent 3d3e3ad commit 3ad4fd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func Contains(t *testing.T, haystack, needle string, msg ...string) {
func Fail(t *testing.T, msg string) {
_, file, line, _ := runtime.Caller(1)
file = file[strings.LastIndex(file, "/")+1:]
fmt.Printf("%s:%d failed %s\n", file, line, msg)
fmt.Printf("%s:%d %s\n", file, line, msg)
t.FailNow()
}

Expand Down

0 comments on commit 3ad4fd5

Please sign in to comment.