https://github.com/blbergwall/assert
A testing assert tool for go
https://github.com/blbergwall/assert
go golang testing testing-tools
Last synced: 6 months ago
JSON representation
A testing assert tool for go
- Host: GitHub
- URL: https://github.com/blbergwall/assert
- Owner: blbergwall
- License: mit
- Created: 2018-08-23T17:39:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-18T15:38:32.000Z (over 5 years ago)
- Last Synced: 2024-06-19T05:42:32.510Z (about 2 years ago)
- Topics: go, golang, testing, testing-tools
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## assert
**Converted to module use "github.com/blbgo/testing/assert"**
A testing assert tool for go.
[](http://godoc.org/github.com/blbergwall/assert)
[](https://goreportcard.com/report/github.com/blbergwall/assert)
[](https://github.com/blbergwall/assert/blob/master/LICENSE.txt)
### 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](https://github.com/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](https://github.com/blbergwall/depend/blob/master/LICENSE.txt)