git-lfs/vendor/github.com/technoweenie/assert
Taylor Blau 4593d0a641 vendor: vendor dependencies in vendor/ using Glide
- script/vendor received an update in order to work with Glide
- import paths have been rewritten to work with GO15VENDOREXPERIMENT
2016-05-23 12:10:35 -06:00
..
example vendor: vendor dependencies in vendor/ using Glide 2016-05-23 12:10:35 -06:00
.gitignore vendor: vendor dependencies in vendor/ using Glide 2016-05-23 12:10:35 -06:00
assert_test.go vendor: vendor dependencies in vendor/ using Glide 2016-05-23 12:10:35 -06:00
assert.go vendor: vendor dependencies in vendor/ using Glide 2016-05-23 12:10:35 -06:00
README.md vendor: vendor dependencies in vendor/ using Glide 2016-05-23 12:10:35 -06:00

Assert (c) Blake Mizerany and Keith Rarick -- MIT LICENCE

Assertions for Go tests

Install

$ go get github.com/bmizerany/assert

Use

point.go

package point

type Point struct {
    x, y int
}

point_test.go

package point

import (
    "testing"
    "github.com/bmizerany/assert"
)

func TestAsserts(t *testing.T) {
    p1 := Point{1, 1}
    p2 := Point{2, 1}

    assert.Equal(t, p1, p2)
}

output $ go test --- FAIL: TestAsserts (0.00 seconds) assert.go:15: /Users/flavio.barbosa/dev/stewie/src/point_test.go:12 assert.go:24: ! X: 1 != 2 FAIL

Docs

http://github.com/bmizerany/assert