MCPcopy Index your code
hub / github.com/buger/jsonparser / TestKeyDepthArray

Function TestKeyDepthArray

parser_error_test.go:106–121  ·  view source on GitHub ↗

try pulling lots of keys out of a big array Verifies: SYS-REQ-008 [boundary] MCDC SYS-REQ-008: N/A

(t *testing.T)

Source from the content-addressed store, hash-verified

104// Verifies: SYS-REQ-008 [boundary]
105// MCDC SYS-REQ-008: N/A
106func TestKeyDepthArray(t *testing.T) {
107 var sb strings.Builder
108 var keys []string
109 //build data
110 sb.WriteString("[")
111 for i := 0; i < 128; i++ {
112 fmt.Fprintf(&sb, `{"key": %d},`, i)
113 keys = append(keys, fmt.Sprintf("[%d].key", i))
114 }
115 sb.WriteString("]")
116
117 data := []byte(sb.String())
118 EachKey(data, func(offset int, value []byte, dt ValueType, err error) {
119 return
120 }, keys)
121}
122
123// check having a bunch of keys
124// Verifies: SYS-REQ-008 [boundary]

Callers

nothing calls this directly

Calls 2

EachKeyFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…