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

Function TestAppendCreatePath

append_test.go:71–79  ·  view source on GitHub ↗

Verifies: SYS-REQ-110 (Set/array append) reqproof:proptest:skip

(t *testing.T)

Source from the content-addressed store, hash-verified

69// Verifies: SYS-REQ-110 (Set/array append)
70// reqproof:proptest:skip
71func TestAppendCreatePath(t *testing.T) {
72 got, err := Append([]byte(`{"a":{}}`), []byte(`1`), "a", "items")
73 if err != nil {
74 t.Fatalf("Append returned error: %v", err)
75 }
76 if want := `{"a":{"items":[1]}}`; string(got) != want {
77 t.Fatalf("Append result = %s, want %s", got, want)
78 }
79}
80
81// Verifies: SYS-REQ-110 (Set/array append)
82// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.85

Tested by

no test coverage detected