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

Function TestAppendNonArrayError

append_test.go:83–91  ·  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

81// Verifies: SYS-REQ-110 (Set/array append)
82// reqproof:proptest:skip
83func TestAppendNonArrayError(t *testing.T) {
84 got, err := Append([]byte(`{"a":1}`), []byte(`2`), "a")
85 if !errors.Is(err, MalformedArrayError) {
86 t.Fatalf("Append error = %v, want %v", err, MalformedArrayError)
87 }
88 if got != nil {
89 t.Fatalf("Append result = %s, want nil", got)
90 }
91}
92
93// Verifies: SYS-REQ-110 (Set/array append)
94// reqproof:proptest:skip

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.85

Tested by

no test coverage detected