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

Function TestObjectEach_OOB_JustOpenBrace

dead_code_audit_oob_test.go:63–72  ·  view source on GitHub ↗

Verifies: SYS-REQ-007 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

61
62// Verifies: SYS-REQ-007 [boundary]
63func TestObjectEach_OOB_JustOpenBrace(t *testing.T) {
64 // { — only opening brace, then nothing
65 err := ObjectEach([]byte(`{`), func(key []byte, value []byte, dataType ValueType, offset int) error {
66 return nil
67 })
68 if err == nil {
69 t.Fatal("expected error for just opening brace")
70 }
71 t.Logf("Correctly got error: %v", err)
72}
73
74// Verifies: SYS-REQ-007 [boundary]
75func TestObjectEach_OOB_BraceAndWhitespace(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ObjectEachFunction · 0.85

Tested by

no test coverage detected