Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit c9b585b

Browse files
committed
update test to not rely on fmt
1 parent 5a2eb61 commit c9b585b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

mapstructure_bugs_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package mapstructure
22

33
import (
4-
"fmt"
54
"reflect"
65
"testing"
76
"time"
@@ -619,8 +618,10 @@ func TestMapOmitEmptyWithEmptyFieldnameInTag(t *testing.T) {
619618
t.Fatal(err)
620619
}
621620

622-
expect := "map[Username:Joe]"
623-
if got := fmt.Sprintf("%+v", m); expect != got {
624-
t.Fatalf("expect %q, got: %s", expect, got)
621+
if len(m) != 1 {
622+
t.Fatalf("fail: %#v", m)
623+
}
624+
if m["Username"] != "Joe" {
625+
t.Fatalf("fail: %#v", m)
625626
}
626627
}

0 commit comments

Comments
 (0)