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

Function TestAppendNestedArray

append_test.go:35–43  ·  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

33// Verifies: SYS-REQ-110 (Set/array append)
34// reqproof:proptest:skip
35func TestAppendNestedArray(t *testing.T) {
36 got, err := Append([]byte(`{"items":[1,2]}`), []byte(`3`), "items")
37 if err != nil {
38 t.Fatalf("Append returned error: %v", err)
39 }
40 if want := `{"items":[1,2,3]}`; string(got) != want {
41 t.Fatalf("Append result = %s, want %s", got, want)
42 }
43}
44
45// Verifies: SYS-REQ-110 (Set/array append)
46// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.85

Tested by

no test coverage detected