checkmate is meant to ease migrating off of gopkg.in/check.v1
and use the Go stdlib testing package instead. It achieves this by embedding
a *testing.T in *check.C and ripping out the test runner code. This means
that the following is now possible:
func myUsefulHelper(tb testing.TB, ...) {
// ...
}
func (s *Suite) TestSomething(c *C) {
myUsefulHelper(c, ...)
}Use it as a global replacement:
$ go mod edit -replace=gopkg.in/check.v1=github.com/khulnasoft/checkmateOr replace imports manually:
import . "github.com/khulnasoft/checkmate"
import check "github.com/khulnasoft/checkmate"This library differs from upstream check in the following ways:
Run*()andTestingT()don't block until all tests have runRun*()don't returnResultanymore, due to the aboveC.Succeed*()fails the test since there is no analog in*testing.TRunConfig.KeepWorkDiris not supported- Any flags that are not benchmark related cause an error
- The output format of
checkis not preserved