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

Function TestConfigBackwardCompat

config_test.go:105–113  ·  view source on GitHub ↗

Verifies: SYS-REQ-115 (package-level API remains strict) SYS-REQ-115:malformed_input:nominal reqproof:proptest:skip targeted witness/regression test; not a property-test subject

(t *testing.T)

Source from the content-addressed store, hash-verified

103// SYS-REQ-115:malformed_input:nominal
104// reqproof:proptest:skip targeted witness/regression test; not a property-test subject
105func TestConfigBackwardCompat(t *testing.T) {
106 if _, _, _, err := Get([]byte(`{'value':'data'}`), "value"); err == nil {
107 t.Fatal("package-level Get accepted single-quoted JSON")
108 }
109
110 if _, err := GetString([]byte("{\"value\":\"bad\\`escape\"}"), "value"); err == nil {
111 t.Fatal("package-level GetString accepted an unknown escape")
112 }
113}
114
115// Verifies: SYS-REQ-115 (Get/Set round trip)
116// SYS-REQ-115:nominal:nominal

Callers

nothing calls this directly

Calls 2

GetFunction · 0.85
GetStringFunction · 0.85

Tested by

no test coverage detected