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

Function TestConfigSet

config_test.go:53–63  ·  view source on GitHub ↗

Verifies: SYS-REQ-115 (mutation of lenient input) SYS-REQ-115:nominal:nominal reqproof:proptest:skip targeted witness/regression test; not a property-test subject

(t *testing.T)

Source from the content-addressed store, hash-verified

51// SYS-REQ-115:nominal:nominal
52// reqproof:proptest:skip targeted witness/regression test; not a property-test subject
53func TestConfigSet(t *testing.T) {
54 data := []byte(`{'name':'old','keep':1}`)
55
56 got, err := Lenient.Set(data, []byte(`"new"`), "name")
57 if err != nil {
58 t.Fatalf("Lenient.Set returned error: %v", err)
59 }
60 if want := `{'name':"new",'keep':1}`; string(got) != want {
61 t.Fatalf("Lenient.Set = %s, want %s", got, want)
62 }
63}
64
65// Verifies: SYS-REQ-115 (unknown escapes are emitted literally)
66// SYS-REQ-115:encoding_safety:nominal

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected