mindoc/vendor/github.com/andybalholm/cascadia/fuzz/fuzz.go

16 lines
282 B
Go
Raw Normal View History

2017-06-05 10:52:14 +08:00
package fuzz
import "github.com/andybalholm/cascadia"
// Fuzz is the entrypoint used by the go-fuzz framework
func Fuzz(data []byte) int {
sel, err := cascadia.Compile(string(data))
if err != nil {
if sel != nil {
panic("sel != nil on error")
}
return 0
}
return 1
}