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

Function TestRemoval1_ArrayEach_LoopExitsOnSingleElement

dead_code_audit_test.go:25–36  ·  view source on GitHub ↗

Verifies: SYS-REQ-006 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

23
24// Verifies: SYS-REQ-006 [boundary]
25func TestRemoval1_ArrayEach_LoopExitsOnSingleElement(t *testing.T) {
26 count := 0
27 _, err := ArrayEach([]byte(`[1]`), func(value []byte, dataType ValueType, offset int, err error) {
28 count++
29 })
30 if err != nil {
31 t.Fatalf("unexpected error: %v", err)
32 }
33 if count != 1 {
34 t.Fatalf("expected 1 callback, got %d", count)
35 }
36}
37
38// Verifies: SYS-REQ-014 [boundary]
39func TestRemoval1_Unescape_LoopExitsOnSingleEscape(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ArrayEachFunction · 0.85

Tested by

no test coverage detected