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

Commit

Permalink
update test to not rely on fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Apr 20, 2022
1 parent 5a2eb61 commit c9b585b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mapstructure_bugs_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package mapstructure

import (
"fmt"
"reflect"
"testing"
"time"
Expand Down Expand Up @@ -619,8 +618,10 @@ func TestMapOmitEmptyWithEmptyFieldnameInTag(t *testing.T) {
t.Fatal(err)
}

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

0 comments on commit c9b585b

Please sign in to comment.