Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gravityblast/miniassert
Mini assert testing framework for the Go language
https://github.com/gravityblast/miniassert
Last synced: about 10 hours ago
JSON representation
Mini assert testing framework for the Go language
- Host: GitHub
- URL: https://github.com/gravityblast/miniassert
- Owner: gravityblast
- License: mit
- Created: 2013-07-31T12:23:56.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-22T12:59:06.000Z (over 10 years ago)
- Last Synced: 2024-06-20T03:52:02.520Z (5 months ago)
- Language: Go
- Homepage:
- Size: 188 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# miniassert
Mini assert testing framework for the Go language
## Usage
package hello
import (
"testing"
"errors"
assert "github.com/pilu/miniassert"
)type Foo struct {}
func Hello() string { return "Hello World" }
func TestSomething(t *testing.T) {
assert.Equal(t, "Hello World", Hello())
assert.True(t, true)
assert.False(t, false)var err error
assert.Nil(t, err)err = errors.New("foo")
assert.NotNil(t, err)foo := &Foo{}
assert.Type(t, "*hello.Foo", foo)
}Run `go test` as usual.
## Author
* [Andrea Franz](http://gravityblast.com)