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

Function TestConfigStrictStillWorks

config_test.go:92–100  ·  view source on GitHub ↗

Verifies: SYS-REQ-115 (zero-value Config 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

90// SYS-REQ-115:malformed_input:nominal
91// reqproof:proptest:skip targeted witness/regression test; not a property-test subject
92func TestConfigStrictStillWorks(t *testing.T) {
93 if _, _, _, err := DefaultConfig.Get([]byte(`{'value':'data'}`), "value"); err == nil {
94 t.Fatal("DefaultConfig.Get accepted single-quoted JSON")
95 }
96
97 if _, err := DefaultConfig.GetString([]byte("{\"value\":\"bad\\`escape\"}"), "value"); err == nil {
98 t.Fatal("DefaultConfig.GetString accepted an unknown escape")
99 }
100}
101
102// Verifies: SYS-REQ-115 (package-level API remains strict)
103// SYS-REQ-115:malformed_input:nominal

Callers

nothing calls this directly

Calls 2

GetMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected