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?
See: http://golang.org/pkg/testing/#T.Fatal (and Fatalf)
The docs say: "Fatal is equivalent to Log() followed by FailNow()."
I build a little helping package as part of my Tideland Common Go Library (see http://code.google.com/p/tcgl/). The API doc can found at http://go.pkgdoc.org/code.google.com/p/tcgl/asserts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With