mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-24 05:50:22 +00:00
21 lines
344 B
Go
21 lines
344 B
Go
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()
|
|
}
|
|
}
|