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

Function TestObjectEach_OOB_TruncatedAfterKey

dead_code_audit_oob_test.go:39–48  ·  view source on GitHub ↗

Verifies: SYS-REQ-007 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

37
38// Verifies: SYS-REQ-007 [boundary]
39func TestObjectEach_OOB_TruncatedAfterKey(t *testing.T) {
40 // {"a" — truncated after key string
41 err := ObjectEach([]byte(`{"a"`), func(key []byte, value []byte, dataType ValueType, offset int) error {
42 return nil
43 })
44 if err == nil {
45 t.Fatal("expected error for truncated object after key")
46 }
47 t.Logf("Correctly got error: %v", err)
48}
49
50// Verifies: SYS-REQ-007 [boundary]
51func TestObjectEach_OOB_TruncatedMidKey(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ObjectEachFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…