add unit test, fix interceptor bug

This commit is contained in:
kevin
2020-09-29 14:30:22 +08:00
parent e7d46aa6e2
commit 33a9db85c8
6 changed files with 87 additions and 3 deletions

View File

@@ -2387,6 +2387,13 @@ func TestUnmarshalNestedMapSimpleTypeMatch(t *testing.T) {
assert.Equal(t, "1", c.Anything["id"])
}
func TestUnmarshalValuer(t *testing.T) {
unmarshaler := NewUnmarshaler(jsonTagKey)
var foo string
err := unmarshaler.UnmarshalValuer(nil, foo)
assert.NotNil(t, err)
}
func BenchmarkUnmarshalString(b *testing.B) {
type inner struct {
Value string `key:"value"`