1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00
This commit is contained in:
Tao Wen
2017-06-06 23:27:00 +08:00
parent 925df245d3
commit cfffa29c8a
43 changed files with 283 additions and 290 deletions

View File

@ -1,13 +1,13 @@
package jsoniter
import (
"encoding/json"
"github.com/json-iterator/go/require"
"reflect"
"strconv"
"testing"
"time"
"unsafe"
"github.com/json-iterator/go/require"
"encoding/json"
)
func Test_customize_type_decoder(t *testing.T) {
@ -179,7 +179,7 @@ func (obj *ObjectImplementedUnmarshaler) UnmarshalJSON([]byte) error {
func Test_unmarshaler(t *testing.T) {
type TestObject struct {
Field *ObjectImplementedUnmarshaler
Field *ObjectImplementedUnmarshaler
Field2 string
}
should := require.New(t)
@ -196,7 +196,7 @@ func Test_unmarshaler(t *testing.T) {
func Test_unmarshaler_and_decoder(t *testing.T) {
type TestObject struct {
Field *ObjectImplementedUnmarshaler
Field *ObjectImplementedUnmarshaler
Field2 string
}
should := require.New(t)
@ -213,4 +213,4 @@ func Test_unmarshaler_and_decoder(t *testing.T) {
err = Unmarshal([]byte(`{"Field":"hello"}`), &obj)
should.Nil(err)
should.Equal(10, int(*obj.Field))
}
}