1
0
mirror of https://github.com/json-iterator/go.git synced 2025-02-19 19:59:49 +02:00
json-iterator/value_tests/slice_test.go
2018-03-15 21:28:16 +08:00

25 lines
463 B
Go

package test
func init() {
nilSlice := []string(nil)
marshalCases = append(marshalCases,
[]interface{}{"hello"},
nilSlice,
&nilSlice,
[]byte{1, 2, 3},
)
unmarshalCases = append(unmarshalCases, unmarshalCase{
ptr: (*[]string)(nil),
input: "null",
}, unmarshalCase{
ptr: (*[]string)(nil),
input: "[]",
}, unmarshalCase{
ptr: (*[]byte)(nil),
input: "[1,2,3]",
}, unmarshalCase{
ptr: (*[]byte)(nil),
input: `"aGVsbG8="`,
})
}