MCPcopy
hub / github.com/buger/jsonparser / TestRemoval5_SearchKeys_ArrayIndex_TooShort

Function TestRemoval5_SearchKeys_ArrayIndex_TooShort

dead_code_audit_test.go:415–422  ·  view source on GitHub ↗

Verifies: SYS-REQ-001 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

413
414// Verifies: SYS-REQ-001 [boundary]
415func TestRemoval5_SearchKeys_ArrayIndex_TooShort(t *testing.T) {
416 data := []byte(`[1, 2, 3]`)
417 // "[]" has keyLen=2 which is < 3 — still caught
418 offset := searchKeys(data, "[]")
419 if offset != -1 {
420 t.Fatalf("expected -1 for empty index '[]', got %d", offset)
421 }
422}
423
424// Verifies: SYS-REQ-001 [boundary]
425func TestRemoval5_SearchKeys_ArrayIndex_NestedObject(t *testing.T) {

Callers

nothing calls this directly

Calls 1

searchKeysFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…