https://github.com/g4s8/go-matchers
Go testing library for descriptive assert matching inspired by Hamcrest-matchers
https://github.com/g4s8/go-matchers
hamcrest matchers testing
Last synced: 2 months ago
JSON representation
Go testing library for descriptive assert matching inspired by Hamcrest-matchers
- Host: GitHub
- URL: https://github.com/g4s8/go-matchers
- Owner: g4s8
- License: mit
- Created: 2020-10-21T17:09:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-09T07:26:12.000Z (over 5 years ago)
- Last Synced: 2025-01-13T12:50:36.973Z (over 1 year ago)
- Topics: hamcrest, matchers, testing
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-matchers
Go testing library for descriptive assert matching
Inspired by http://hamcrest.org/
## Example
```go
import m "github.com/g4s8/go-matchers"
func Test_Matchers(t *testing.T) {
m.Assert(t).That("2 + 2 = 4", 2+2, m.EqualTo(4))
m.Assert(t).That([]{1,2,3}, m.Not(m.Nil()))
}
```