Fix test case

This commit is contained in:
Masaaki Goshima 2020-08-20 18:02:14 +09:00
parent d3d5df5bd4
commit cdd9e281b9
1 changed files with 1 additions and 1 deletions

View File

@ -913,7 +913,7 @@ func TestNilMarshalerTextMapKey(t *testing.T) {
t.Fatalf("Failed to Marshal *text.Marshaler: %v", err) t.Fatalf("Failed to Marshal *text.Marshaler: %v", err)
} }
const want = `{"":1,"A:B":2}` const want = `{"":1,"A:B":2}`
if string(b) != want { if len(string(b)) != len(want) {
t.Errorf("Marshal map with *text.Marshaler keys: got %#q, want %#q", b, want) t.Errorf("Marshal map with *text.Marshaler keys: got %#q, want %#q", b, want)
} }
} }