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

Function TestObjectEach_OOB_BraceAndWhitespace

dead_code_audit_oob_test.go:75–84  ·  view source on GitHub ↗

Verifies: SYS-REQ-007 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

73
74// Verifies: SYS-REQ-007 [boundary]
75func TestObjectEach_OOB_BraceAndWhitespace(t *testing.T) {
76 // { — opening brace then only whitespace
77 err := ObjectEach([]byte(`{ `), func(key []byte, value []byte, dataType ValueType, offset int) error {
78 return nil
79 })
80 if err == nil {
81 t.Fatal("expected error for brace+whitespace")
82 }
83 t.Logf("Correctly got error: %v", err)
84}
85
86// ArrayEach infinite loop guard: verify o==0 catches all no-progress cases
87// Verifies: SYS-REQ-006 [boundary]

Callers

nothing calls this directly

Calls 1

ObjectEachFunction · 0.85

Tested by

no test coverage detected