项目作者: SimonRichardson
项目描述 :
Shrink test cases using go stdlib quick.Check
高级语言: Go
项目地址: git://github.com/SimonRichardson/shrink.git
shrink
Shrink is a drop in replacement for the stdlib quick.Check
, but with the
additional benefits of shrinking the input arguments on failure.
Example
func TestDivide(t *testing.T) {
fn := func(x int) bool {
return (x % 1000) < 10
}
if err := shrink.Check(fn, nil); err != nil {
t.Error(err)
}
}