Verifies: SYS-REQ-007 [boundary]
(t *testing.T)
| 49 | |
| 50 | // Verifies: SYS-REQ-007 [boundary] |
| 51 | func TestObjectEach_OOB_TruncatedMidKey(t *testing.T) { |
| 52 | // {"a — unterminated string |
| 53 | err := ObjectEach([]byte(`{"a`), func(key []byte, value []byte, dataType ValueType, offset int) error { |
| 54 | return nil |
| 55 | }) |
| 56 | if err == nil { |
| 57 | t.Fatal("expected error for unterminated key string") |
| 58 | } |
| 59 | t.Logf("Correctly got error: %v", err) |
| 60 | } |
| 61 | |
| 62 | // Verifies: SYS-REQ-007 [boundary] |
| 63 | func TestObjectEach_OOB_JustOpenBrace(t *testing.T) { |
nothing calls this directly
no test coverage detected