super-graph/core/internal/qcode/fuzz.go
2020-04-10 02:27:43 -04:00

21 lines
299 B
Go

// +build gofuzz
package qcode
// FuzzerEntrypoint for Fuzzbuzz
func Fuzz(data []byte) int {
qt := GetQType(string(data))
if qt > QTUpsert {
panic("qt > QTUpsert")
}
qcompile, _ := NewCompiler(Config{})
_, err := qcompile.Compile(data, "user")
if err != nil {
return 0
}
return 1
}