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

Function TestRemoval5_SearchKeys_ArrayIndex_Valid

dead_code_audit_test.go:395–402  ·  view source on GitHub ↗

============================================================================= REMOVAL 5: `keys[level][0] != '['` removed in searchKeys The original code was: `keys[level][0] != '[' || keys[level][keyLen-1] != ']'` within `if keyLevel == level && keys[level][0] == '['` So keys[level][0] != '[' was AL

(t *testing.T)

Source from the content-addressed store, hash-verified

393
394// Verifies: SYS-REQ-001 [boundary]
395func TestRemoval5_SearchKeys_ArrayIndex_Valid(t *testing.T) {
396 data := []byte(`[1, "two", 3]`)
397 // searchKeys with "[1]" should find element at index 1
398 offset := searchKeys(data, "[1]")
399 if offset == -1 {
400 t.Fatal("searchKeys failed to find array index [1]")
401 }
402}
403
404// Verifies: SYS-REQ-001 [boundary]
405func TestRemoval5_SearchKeys_ArrayIndex_MalformedNoClose(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…