Skip to content

Shrink test cases using go stdlib quick.Check

License

Notifications You must be signed in to change notification settings

SimonRichardson/shrink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
  }
}

About

Shrink test cases using go stdlib quick.Check

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages