bmizerany/assert


Asserts to Go testing

Language: Go


NO LONGER MAINTAINED - Just use Go's testing package.

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

Project Statistics

Sourcerank 7
Repository Size 31.3 KB
Stars 136
Forks 36
Watchers 3
Open issues 6
Dependencies 0
Contributors 4
Tags 1
Created
Last updated
Last pushed

Top Contributors See all

Blake Mizerany Keith Rarick Flávio Ribeiro Nick Stott

Packages Referencing this Repo

github.com/bmizerany/assert
Asserts to Go testing
Latest release release.r60 - Published - 136 stars
github.com/bmizerany/assert/example
Asserts to Go testing
Latest release release.r60 - Published - 136 stars

Recent Tags See all

release.r60 June 08, 2011

Interesting Forks See all

stvp/assert
Simple test assertions for Golang tests
Go - Last pushed - 4 stars - 3 forks
moovweb/assert
Asserts to Go testing
Go - Last pushed - 1 stars
fsouza/assert
Asserts to Go testing
This repository is no longer available - 1 stars
technoweenie/assert
Asserts to Go testing
Go - Updated - 1 stars - 1 forks
nstott/assert
Asserts to Go testing
Go - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2016-11-24 15:11:30 UTC

Login to resync this repository