Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.
zouyxPublic archive

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

gomatcher - Powerful matcher for Golang

Build Status codebeat badge Coverage Status License GoDoc GitHub release

gomatcher is a powerful matcher for Golang testing designed for easy to write test case.

Simple, readable and humanized, also easy to extended.

Help you become an excellent Golang Software Engineer is my believe.

Chinese doc

Installation

Install Go Env Getting Started .Once finished,then enjoy yourself.

gopm get github.com/zouyx/gomatcher -v -g

Or

go get -u github.com/zouyx/gomatcher

PS: Prefer Golang 1.6+

Features

  • Assert.List
  • Assert.Object
  • Assert.String

More feature please respect.

Usage

  • Assert equal
func TestEqual(t *testing.T) {
	Assert(t,2,Equal(2))
	Assert(t,"joe",Equal("joe"))
}
  • Assert not equal
func TestNotEqual(t *testing.T) {
	Assert(t,2,NotEqual(3))
	Assert(t,"joe",NotEqual("joe1"))
}

or

func TestNotEqual(t *testing.T) {
	Assert(t,2,Not(Equal(3)))
	Assert(t,"joe",Not(Equal("joe1")))
}

More usage,check test case please.More info check Wiki .

If you think the tool is good or have any problems,must let me know, contact me by email when feel free or create a issue.

Contribution

License

The project is licensed under the Apache 2 license.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages