https://github.com/peterhellberg/fuzz
Randomized testing for my Go packages using go-fuzz
https://github.com/peterhellberg/fuzz
Last synced: 12 months ago
JSON representation
Randomized testing for my Go packages using go-fuzz
- Host: GitHub
- URL: https://github.com/peterhellberg/fuzz
- Owner: peterhellberg
- Created: 2015-07-28T14:22:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T23:24:50.000Z (over 10 years ago)
- Last Synced: 2025-01-14T07:11:29.665Z (about 1 year ago)
- Language: Go
- Size: 125 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fuzz
Randomized testing for my Go packages using [go-fuzz](https://github.com/dvyukov/go-fuzz)
## Example
```go
// +build gofuzz
package duration
import "github.com/peterhellberg/duration"
func Fuzz(data []byte) int {
if _, err := duration.Parse(string(data)); err == nil {
return 1
}
return -1
}
```