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

Function TestRemoval1_ObjectEach_LoopExitsOnEmptyObject

dead_code_audit_test.go:61–69  ·  view source on GitHub ↗

Verifies: SYS-REQ-007 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

59
60// Verifies: SYS-REQ-007 [boundary]
61func TestRemoval1_ObjectEach_LoopExitsOnEmptyObject(t *testing.T) {
62 err := ObjectEach([]byte(`{}`), func(key []byte, value []byte, dataType ValueType, offset int) error {
63 t.Fatal("callback should not be called for empty object")
64 return nil
65 })
66 if err != nil {
67 t.Fatalf("unexpected error on empty object: %v", err)
68 }
69}
70
71// Verifies: SYS-REQ-007 [boundary]
72func TestRemoval1_ObjectEach_LoopExitsOnSingleEntry(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ObjectEachFunction · 0.85

Tested by

no test coverage detected