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

consolidate more tests

This commit is contained in:
Tao Wen
2018-02-13 20:58:29 +08:00
parent c3b6c1e845
commit 761ce8cce2
18 changed files with 237 additions and 276 deletions

16
api_tests/config_test.go Normal file
View File

@ -0,0 +1,16 @@
package test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/json-iterator/go"
"encoding/json"
)
func Test_use_number_for_unmarshal(t *testing.T) {
should := require.New(t)
api := jsoniter.Config{UseNumber: true}.Froze()
var obj interface{}
should.Nil(api.UnmarshalFromString("123", &obj))
should.Equal(json.Number("123"), obj)
}