summaryrefslogtreecommitdiff
path: root/vendor/github.com/imdario/mergo/issue61_test.go
blob: 8efa5e45704ecc6d8001489a48f000832deed678 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package mergo

import (
	"reflect"
	"testing"
)

func TestIssue61MergeNilMap(t *testing.T) {
	type T struct {
		I map[string][]string
	}
	t1 := T{}
	t2 := T{I: map[string][]string{"hi": {"there"}}}
	if err := Merge(&t1, t2); err != nil {
		t.Fail()
	}
	if !reflect.DeepEqual(t2, T{I: map[string][]string{"hi": {"there"}}}) {
		t.FailNow()
	}
}