MCPcopy
hub / github.com/darccio/mergo / TestIssue209

Function TestIssue209

issue209_test.go:9–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestIssue209(t *testing.T) {
10 dst := []string{"a", "b"}
11 src := []string{"c", "d"}
12
13 if err := mergo.Merge(&dst, src, mergo.WithAppendSlice); err != nil {
14 t.Error(err)
15 }
16
17 expected := []string{"a", "b", "c", "d"}
18 if len(dst) != len(expected) {
19 t.Errorf("arrays not equal length")
20 }
21 for i := range expected {
22 if dst[i] != expected[i] {
23 t.Errorf("array elements at %d are not equal", i)
24 }
25 }
26}

Callers

nothing calls this directly

Calls 1

MergeFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…