super-graph/qcode/fuzz.go

17 lines
244 B
Go
Raw Normal View History

// +build gofuzz
2019-04-18 21:08:14 -04:00
package qcode
// FuzzerEntrypoint for Fuzzbuzz
2019-10-26 03:02:05 -04:00
func Fuzz(data []byte) int {
2019-11-25 02:22:33 -05:00
GetQType(string(data))
2019-04-18 21:08:14 -04:00
qcompile, _ := NewCompiler(Config{})
2019-10-14 02:51:36 -04:00
_, err := qcompile.Compile(data, "user")
2019-04-18 21:08:14 -04:00
if err != nil {
2019-10-26 03:02:05 -04:00
return 0
2019-04-18 21:08:14 -04:00
}
2019-10-26 03:02:05 -04:00
return 1
2019-04-18 21:08:14 -04:00
}