MCPcopy Create free account
hub / github.com/buger/jsonparser / TestRemoval5_SearchKeys_ArrayIndex_TooShort

Function TestRemoval5_SearchKeys_ArrayIndex_TooShort

dead_code_audit_test.go:421–428  ·  view source on GitHub ↗

Verifies: SYS-REQ-001 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

searchKeysFunction · 0.85

Tested by

no test coverage detected