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-14 08:39:18 +08:00
parent e3bc511e5a
commit 64c1c67885
8 changed files with 133 additions and 196 deletions

View File

@ -3,6 +3,7 @@ package test
import "math/big"
func init() {
nilMap := map[string]string(nil)
marshalCases = append(marshalCases,
map[string]interface{}{"abc": 1},
map[string]MyInterface{"hello": MyString("world")},
@ -17,10 +18,15 @@ func init() {
uint64(2): "a",
uint64(4): "a",
},
nilMap,
&nilMap,
)
unmarshalCases = append(unmarshalCases, unmarshalCase{
ptr: (*map[string]string)(nil),
input: `{"k\"ey": "val"}`,
}, unmarshalCase{
ptr: (*map[string]string)(nil),
input: `null`,
})
}