Skip to content

kdar/gtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gtest GoDoc

import "github.com/kdar/gtest"

gtest is a testing package revolving around the amazing GoConvey assertions. It's for those of you who like its assertions but do not like BDD style testing.

Examples

Do a test and call t.Fatal if it fails

g := NewTest(t)
g.So(a, should.Resemble, b).ElseFatal()
// or more succinctly:
g.Require(a, should.Resemble, b)

Do a test and call t.Error if it fails

g := NewTest(t)
g.So(a, should.Resemble, b).ElseError()
// or more succinctly:
g.Assert(a, should.Resemble, b)

Do a test and call t.Fatalf

g := NewTest(t)
g.So(a, should.Resemble, b).ElseFatalf("failed at index %d\n%s\n", i, gotest.MSG)

About

Go testing package using GoConvey assertions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages