mirror of
https://github.com/chaisql/chai.git
synced 2025-10-09 01:20:11 +08:00
Move parser to internal package
This commit is contained in:
18
internal/sql/parser/parser_fuzz_test.go
Normal file
18
internal/sql/parser/parser_fuzz_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
//go:build go1.17
|
||||
// +build go1.17
|
||||
|
||||
package parser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func FuzzParseQuery(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, s string) {
|
||||
// Fuzz ParseQuery for panics.
|
||||
q, err := ParseQuery(s)
|
||||
if err != nil || len(q.Statements) < 1 {
|
||||
t.Skip()
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user