generated from TrueCloudLab/basic
Evgenii Stratonikov
2fa27b6557
Make it possible to execute fuzz tests with different backend, such as go-fuzz which supports coverage collection. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
13 lines
192 B
Go
13 lines
192 B
Go
//go:build gofuzz
|
|
// +build gofuzz
|
|
|
|
package chain
|
|
|
|
func DoFuzzChainUnmarshalBinary(data []byte) int {
|
|
var ch Chain
|
|
err := ch.UnmarshalBinary(data)
|
|
if err != nil {
|
|
return 0
|
|
}
|
|
return 1
|
|
}
|