Skip to content

assertgo/assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a3e1a2d · Feb 14, 2015
Jan 6, 2015
Jan 8, 2015
Jan 6, 2015
Feb 14, 2015
Jan 6, 2015
Jan 6, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 6, 2015
Jan 6, 2015
Dec 28, 2014
Dec 25, 2014
Dec 26, 2014
Jan 5, 2015
Jan 6, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Dec 21, 2014
Dec 21, 2014
Jan 6, 2015
Jan 6, 2015
Jan 6, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Jan 4, 2015
Dec 20, 2014
Jan 6, 2015

Repository files navigation

assertgo

Join the chat at https://gitter.im/assertgo/assert

Build Status Coverage Status GoDoc

The coolest assertion library for go language!

Version: 2.0.0

Getting started

To get the package, execute:

go get github.com/assertgo/assert

To import this package, add the following line to your code:

import "github.com/assertgo/assert"

And just start using it.

func TestPerfectNumber(t *testing.T) {
	assert := assert.New(t)
	num := ComputePerfectNumber()
	assert.ThatInt(num).
		IsEqualTo(6).
		IsNonZero().
		IsPositive().
		IsNonNegative().
		IsEven().
		IsDivisibleBy(3).
		IsBetween(4, 10).
		IsIn(496, 28, 6).
		IsNotIn(2, 3, 5, 7, 11, 13)
}

Stating what you expect was never that easy.

Contibuting

Please see CONTRIBUTING.md.

License

assertgo is a free software and may be used under the terms specified in the LICENSE file.