MCPcopy Create free account
hub / github.com/lib/pq / FuzzParseArray

Function FuzzParseArray

fuzz_test.go:14–43  ·  view source on GitHub ↗
(f *testing.F)

Source from the content-addressed store, hash-verified

12}
13
14func FuzzParseArray(f *testing.F) {
15 for _, a := range []string{
16 `{"hello","world"}`,
17 `{1,2}`,
18 `{}`,
19 `{NULL}`,
20 `{a}`,
21 `{a,b}`,
22 `{{a,b}}`,
23 `{{a},{b}}`,
24 `{{{a,b},{c,d},{e,f}}}`,
25 `{""}`,
26 `{","}`,
27 `{",",","}`,
28 `{{",",","}}`,
29 `{{","},{","}}`,
30 `{{{",",","},{",",","},{",",","}}}`,
31 `{"\"}"}`,
32 `{"\"","\""}`,
33 `{{"\"","\""}}`,
34 `{{"\""},{"\""}}`,
35 `{{{"\"","\""},{"\"","\""},{"\"","\""}}}`,
36 } {
37 f.Add([]byte(a))
38 }
39
40 f.Fuzz(func(t *testing.T, array []byte) {
41 parseArray(array, []byte{','})
42 })
43}

Callers

nothing calls this directly

Calls 1

parseArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…