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

Function assertBackingArrayUnchanged

v131_regression_test.go:21–27  ·  view source on GitHub ↗
(t *testing.T, input, snapshot []byte)

Source from the content-addressed store, hash-verified

19}
20
21func assertBackingArrayUnchanged(t *testing.T, input, snapshot []byte) {
22 t.Helper()
23
24 if got := input[:cap(input)]; !bytes.Equal(got, snapshot) {
25 t.Fatalf("input backing array changed:\n got: %v\nwant: %v", got, snapshot)
26 }
27}
28
29// Verifies: SYS-REQ-009 [regression, issues #209 and #141]
30func TestSetDoesNotMutateInputBackingArrayWhenGrowing(t *testing.T) {

Calls

no outgoing calls

Tested by

no test coverage detected