Skip to content

chai2010/assert

Repository files navigation


Assert for Go testing

Build Status Go Report Card GoDoc

Install

  1. go get -u github.com/chai2010/assert
  2. go test

Example

package somepkg_test

import (
	. "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 chaishushan@gmail.com.

Thanks!