Reputation: 47619
I want to do this:
test.FailNow("My Message")
but test.T.FailNow
doesn't take a message. I am currently doing:
log.Println("Expected exception but got none")
test.FailNow()
Is there a better way?
Upvotes: 5
Views: 1100
Reputation: 91253
See: http://golang.org/pkg/testing/#T.Fatal (and Fatalf)
The docs say: "Fatal is equivalent to Log() followed by FailNow()."
Upvotes: 9