Add fuzz testing to qcode

This commit is contained in:
Vikram Rangnekar
2019-04-18 21:08:14 -04:00
parent bdf76fcd5e
commit 7f8ab26218
10 changed files with 143 additions and 0 deletions

14
qcode/fuzz.go Normal file
View 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
}