Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chai2010/assert
Assert for Go1.9+
https://github.com/chai2010/assert
Last synced: 3 months ago
JSON representation
Assert for Go1.9+
- Host: GitHub
- URL: https://github.com/chai2010/assert
- Owner: chai2010
- License: bsd-3-clause
- Created: 2014-09-19T03:46:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-05T09:48:03.000Z (over 4 years ago)
- Last Synced: 2024-10-06T01:18:13.701Z (3 months ago)
- Language: Go
- Homepage: http://godoc.org/github.com/chai2010/assert
- Size: 39.1 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
- *Go语言QQ群: 102319854, 1055927514*
- *凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa*----
# Assert for Go testing
[![Build Status](https://travis-ci.org/chai2010/assert.svg)](https://travis-ci.org/chai2010/assert)
[![Go Report Card](https://goreportcard.com/badge/github.com/chai2010/assert)](https://goreportcard.com/report/github.com/chai2010/assert)
[![GoDoc](https://godoc.org/github.com/chai2010/assert?status.svg)](https://godoc.org/github.com/chai2010/assert)## Install
1. `go get -u github.com/chai2010/assert`
2. `go test`## Example
```Go
package somepkg_testimport (
. "github.com/chai2010/assert"
)func TestAssert(t *testing.T) {
Assert(t, 1 == 1)
Assert(t, 1 == 1, "message1", "message2")
}func TestAssertf(t *testing.T) {
Assertf(t, 1 == 1, "%v:%v", "message1", "message2")
}
```## BUGS
Report bugs to .
Thanks!