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

Function TestConfigGetString

config_test.go:38–48  ·  view source on GitHub ↗

Verifies: SYS-REQ-115 (single-quoted string decoding) 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

36// SYS-REQ-115:nominal:nominal
37// reqproof:proptest:skip targeted witness/regression test; not a property-test subject
38func TestConfigGetString(t *testing.T) {
39 data := []byte(`{'message':'it\'s\nlenient'}`)
40
41 got, err := Lenient.GetString(data, "message")
42 if err != nil {
43 t.Fatalf("Lenient.GetString returned error: %v", err)
44 }
45 if want := "it's\nlenient"; got != want {
46 t.Fatalf("Lenient.GetString = %q, want %q", got, want)
47 }
48}
49
50// Verifies: SYS-REQ-115 (mutation of lenient input)
51// SYS-REQ-115:nominal:nominal

Callers

nothing calls this directly

Calls 1

GetStringMethod · 0.45

Tested by

no test coverage detected