|
|
@ -5490,7 +5490,7 @@ func TestUnmarshalerProcessFieldPrimitiveWithJSONNumber(t *testing.T) {
|
|
|
|
err := m.processFieldPrimitiveWithJSONNumber(fieldType, value.Elem(), v,
|
|
|
|
err := m.processFieldPrimitiveWithJSONNumber(fieldType, value.Elem(), v,
|
|
|
|
&fieldOptionsWithContext{}, "field")
|
|
|
|
&fieldOptionsWithContext{}, "field")
|
|
|
|
assert.Error(t, err)
|
|
|
|
assert.Error(t, err)
|
|
|
|
assert.Equal(t, `type mismatch for field "field", expect "string", actual "int"`, err.Error())
|
|
|
|
assert.Equal(t, `type mismatch for field "field", expect "string", actual "number"`, err.Error())
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
t.Run("right type", func(t *testing.T) {
|
|
|
|
t.Run("right type", func(t *testing.T) {
|
|
|
|