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

Function TestAppendMultiple

append_test.go:115–127  ·  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

113// Verifies: SYS-REQ-110 (Set/array append)
114// reqproof:proptest:skip
115func TestAppendMultiple(t *testing.T) {
116 got := []byte(`[]`)
117 var err error
118 for _, value := range []string{"1", "2", "3"} {
119 got, err = Append(got, []byte(value))
120 if err != nil {
121 t.Fatalf("Append %s returned error: %v", value, err)
122 }
123 }
124 if want := `[1,2,3]`; string(got) != want {
125 t.Fatalf("Append result = %s, want %s", got, want)
126 }
127}
128
129// Verifies: SYS-REQ-110 (Set/array append)
130// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.85

Tested by

no test coverage detected