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

Function TestCodeMCDC_FindKeyStartArrayRoot

mcdc_supplement_test.go:662–670  ·  view source on GitHub ↗

Verifies: SYS-REQ-001 [boundary] Code MC/DC gap: parser.go:61 findKeyStart ln > 0 with data[i] == '[' Drive the branch where data starts with '[' (array root).

(t *testing.T)

Source from the content-addressed store, hash-verified

660// Code MC/DC gap: parser.go:61 findKeyStart ln > 0 with data[i] == '['
661// Drive the branch where data starts with '[' (array root).
662func TestCodeMCDC_FindKeyStartArrayRoot(t *testing.T) {
663 // When data starts with '[', findKeyStart enters the array branch.
664 // This drives data[i] == '[' to TRUE.
665 offset, err := findKeyStart([]byte(`[{"a":1}]`), "a")
666 // The function will try to find key "a" but since it's inside an array,
667 // we expect it to either find the key or return not-found.
668 _ = offset
669 _ = err
670}
671
672// Verifies: SYS-REQ-035 [boundary]
673// Code MC/DC gap: parser.go:800 Delete data[endOffset+tokEnd] == ']'

Callers

nothing calls this directly

Calls 1

findKeyStartFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…