Skip to content

daviddengcn/go-assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-test GoSearch

Assert utils for GO testing.

Featured

  • LinesEqual and TextEquals Other than showing the assertion failure message, they also shows the line-to-line diff result for your information:

Example code

func TestForExample(t *testing.T) {
	TextEquals(t, "info",
`Hello world,
Pleae help me,
doing this`,
`Hello world,
please help me`)
}

Results

--- FAIL: TestForExample (0.00 seconds)
	assert.go:123: assert.go:172: Unexpected info: exp 2, act 3 lines
	assert.go:124: Difference(exp ===  act ### change --- +++)
	assert.go:147: ---   2: please help me.
	assert.go:148: +++   2: Pleae help me,.
	assert.go:143: ###   3: doing this.

License

BSD license.

About

Testing utils for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages