Package list golang-github-imdario-mergo / 7deb9a0c-95ac-4160-873f-958ff2a9142a/upstream pr80_test.go
7deb9a0c-95ac-4160-873f-958ff2a9142a/upstream

Tree @7deb9a0c-95ac-4160-873f-958ff2a9142a/upstream (Download .tar.gz)

pr80_test.go @7deb9a0c-95ac-4160-873f-958ff2a9142a/upstreamraw · history · blame

package mergo_test

import (
	"testing"

	"github.com/imdario/mergo"
)

type mapInterface map[string]interface{}

func TestMergeMapsEmptyString(t *testing.T) {
	a := mapInterface{"s": ""}
	b := mapInterface{"s": "foo"}
	if err := mergo.Merge(&a, b); err != nil {
		t.Error(err)
	}
	if a["s"] != "foo" {
		t.Errorf("b not merged in properly: a.s.Value(%s) != expected(%s)", a["s"], "foo")
	}
}