The coolest assertion library for go language!
Version: 2.0.0
To get the package, execute:
go get github.com/assertgo/assert
To import this package, add the following line to your code:
import "github.com/assertgo/assert"
And just start using it.
func TestPerfectNumber(t *testing.T) {
assert := assert.New(t)
num := ComputePerfectNumber()
assert.ThatInt(num).
IsEqualTo(6).
IsNonZero().
IsPositive().
IsNonNegative().
IsEven().
IsDivisibleBy(3).
IsBetween(4, 10).
IsIn(496, 28, 6).
IsNotIn(2, 3, 5, 7, 11, 13)
}
Stating what you expect was never that easy.
Please see CONTRIBUTING.md.
assertgo is a free software and may be used under the terms specified in the LICENSE file.