项目作者: SimonRichardson

项目描述 :
Shrink test cases using go stdlib quick.Check
高级语言: Go
项目地址: git://github.com/SimonRichardson/shrink.git
创建时间: 2018-01-01T20:59:24Z
项目社区:https://github.com/SimonRichardson/shrink

开源协议:GNU General Public License v3.0

下载


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

  1. func TestDivide(t *testing.T) {
  2. fn := func(x int) bool {
  3. return (x % 1000) < 10
  4. }
  5. if err := shrink.Check(fn, nil); err != nil {
  6. t.Error(err)
  7. }
  8. }