🚦 A minimal & stateless assert package for writing tests.
8 Commits
.gitignore | ||
Contains_test.go | ||
Contains.go | ||
Equal_test.go | ||
Equal.go | ||
errors_test.go | ||
errors.go | ||
go.mod | ||
Nil_test.go | ||
Nil.go | ||
README.md | ||
test.go | ||
True_test.go | ||
True.go |
assert
A minimal & stateless assert package for writing tests.
Features
- Simple interface
- Tiny codebase
- Zero dependencies
Installation
go get git.akyoto.dev/go/assert
Usage
assert.Nil(t, nil)
assert.True(t, true)
assert.Equal(t, "Hello", "Hello")
assert.DeepEqual(t, "Hello", "Hello")
assert.Contains(t, "Hello", "ello")
Tests
PASS: TestContains
PASS: TestNotContains
PASS: TestFailContains
PASS: TestFailNotContains
PASS: TestEqual
PASS: TestNotEqual
PASS: TestDeepEqual
PASS: TestFailEqual
PASS: TestFailNotEqual
PASS: TestFailDeepEqual
PASS: TestNil
PASS: TestNotNil
PASS: TestFailNil
PASS: TestFailNotNil
PASS: TestTrue
coverage: 100.0% of statements
License
Please see the license documentation.
Copyright
© 2019 Eduard Urbach