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

Function TestObjectEach_OOB_TruncatedAfterColon

dead_code_audit_oob_test.go:27–36  ·  view source on GitHub ↗

Verifies: SYS-REQ-007 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

25
26// Verifies: SYS-REQ-007 [boundary]
27func TestObjectEach_OOB_TruncatedAfterColon(t *testing.T) {
28 // {"a": — truncated after colon
29 err := ObjectEach([]byte(`{"a":`), func(key []byte, value []byte, dataType ValueType, offset int) error {
30 return nil
31 })
32 if err == nil {
33 t.Fatal("expected error for truncated object after colon")
34 }
35 t.Logf("Correctly got error: %v", err)
36}
37
38// Verifies: SYS-REQ-007 [boundary]
39func TestObjectEach_OOB_TruncatedAfterKey(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…