1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

support TextMarshaler as map key

This commit is contained in:
Tao Wen
2018-02-18 22:49:06 +08:00
parent 577ddede74
commit d8e64aa825
6 changed files with 147 additions and 131 deletions

View File

@ -54,9 +54,9 @@ func Test_marshal(t *testing.T) {
t.Run(name, func(t *testing.T) {
should := require.New(t)
output1, err1 := json.Marshal(testCase)
should.NoError(err1)
should.NoError(err1, "json")
output2, err2 := jsoniter.ConfigCompatibleWithStandardLibrary.Marshal(testCase)
should.NoError(err2)
should.NoError(err2, "jsoniter")
should.Equal(string(output1), string(output2))
})
}