Add fuzz testing to qcode
This commit is contained in:
14
qcode/fuzz.go
Normal file
14
qcode/fuzz.go
Normal file
@ -0,0 +1,14 @@
|
||||
package qcode
|
||||
|
||||
// FuzzerEntrypoint for Fuzzbuzz
|
||||
func FuzzerEntrypoint(data []byte) int {
|
||||
testData := string(data)
|
||||
|
||||
qcompile, _ := NewCompiler(Config{})
|
||||
_, err := qcompile.CompileQuery(testData)
|
||||
if err != nil {
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
Reference in New Issue
Block a user