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

Function TestEachKeyNoRequests

parser_error_test.go:50–58  ·  view source on GitHub ↗

Verifies: SYS-REQ-008 [boundary] MCDC SYS-REQ-008: eachkey_callback_receives_found_values=F, eachkey_completes_requested_scan=F, eachkey_malformed_input_returns_error=F, missing_multipath_request_does_not_emit_callback=F, multipath_requests_are_provided=F => TRUE

(t *testing.T)

Source from the content-addressed store, hash-verified

48// Verifies: SYS-REQ-008 [boundary]
49// MCDC SYS-REQ-008: eachkey_callback_receives_found_values=F, eachkey_completes_requested_scan=F, eachkey_malformed_input_returns_error=F, missing_multipath_request_does_not_emit_callback=F, multipath_requests_are_provided=F => TRUE
50func TestEachKeyNoRequests(t *testing.T) {
51 called := false
52 EachKey([]byte(`{"a":1}`), func(idx int, value []byte, vt ValueType, err error) {
53 called = true
54 })
55 if called {
56 t.Fatal("EachKey should not invoke the callback when no paths are requested")
57 }
58}
59
60// check having a very deep key depth
61// Verifies: SYS-REQ-008 [boundary]

Callers

nothing calls this directly

Calls 1

EachKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…