super-graph/qcode/fuzz.go

17 lines
244 B
Go
Raw Normal View History

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