1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-12 22:47:42 +02:00

consolidate more tests

This commit is contained in:
Tao Wen
2018-02-14 08:28:17 +08:00
parent 8fa357ab7b
commit e3bc511e5a
9 changed files with 99 additions and 258 deletions

View File

@ -1,10 +1,27 @@
package test
import "math/big"
func init() {
marshalCases = append(marshalCases,
map[string]interface{}{"abc": 1},
map[string]MyInterface{"hello": MyString("world")},
map[*big.Float]string{big.NewFloat(1.2): "2"},
map[string]interface{}{
"3": 3,
"1": 1,
"2": 2,
},
map[uint64]interface{}{
uint64(1): "a",
uint64(2): "a",
uint64(4): "a",
},
)
unmarshalCases = append(unmarshalCases, unmarshalCase{
ptr: (*map[string]string)(nil),
input: `{"k\"ey": "val"}`,
})
}
type MyInterface interface {