https://github.com/simonrichardson/shrink
Shrink test cases using go stdlib quick.Check
https://github.com/simonrichardson/shrink
fuzzing quickcheck shrink testing
Last synced: about 2 months ago
JSON representation
Shrink test cases using go stdlib quick.Check
- Host: GitHub
- URL: https://github.com/simonrichardson/shrink
- Owner: SimonRichardson
- License: gpl-3.0
- Created: 2018-01-01T20:59:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-02T17:38:06.000Z (over 7 years ago)
- Last Synced: 2025-01-29T17:30:40.922Z (4 months ago)
- Topics: fuzzing, quickcheck, shrink, testing
- Language: Go
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```go
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)
}
}
```