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

Function TestAppendEmptyArray

append_test.go:23–31  ·  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

21// Verifies: SYS-REQ-110 (Set/array append)
22// reqproof:proptest:skip
23func TestAppendEmptyArray(t *testing.T) {
24 got, err := Append([]byte(`[]`), []byte(`1`))
25 if err != nil {
26 t.Fatalf("Append returned error: %v", err)
27 }
28 if want := `[1]`; string(got) != want {
29 t.Fatalf("Append result = %s, want %s", got, want)
30 }
31}
32
33// Verifies: SYS-REQ-110 (Set/array append)
34// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.85

Tested by

no test coverage detected