assert
A testing assert tool for go.
Install
go get github.com/blbergwall/assert
Overview
Provide a collection of assert and testing helper methods
When an assert fails t.Fatal is called ending the current test with failure
Usage
func TestATest(t *testing.T) {
a := assert.New(t)
result, err := methodUnderTest()
a.NoError(err)
a.Equal(5, result)
}
Why?
Mainly because this package is used by another package I plan to provide.
I am aware of stretchr/testify and
maybe I should switch to using that.
Also I am fairly new to go and publishing open source code and want to learn
more about both.
License
MIT