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

Function TestAppendObject

append_test.go:47–55  ·  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

45// Verifies: SYS-REQ-110 (Set/array append)
46// reqproof:proptest:skip
47func TestAppendObject(t *testing.T) {
48 got, err := Append([]byte(`{"users":[]}`), []byte(`{"name":"Bob"}`), "users")
49 if err != nil {
50 t.Fatalf("Append returned error: %v", err)
51 }
52 if want := `{"users":[{"name":"Bob"}]}`; string(got) != want {
53 t.Fatalf("Append result = %s, want %s", got, want)
54 }
55}
56
57// Verifies: SYS-REQ-110 (Set/array append)
58// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.85

Tested by

no test coverage detected