1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-23 11:37:32 +02:00
json-iterator/value_tests/slice_test.go
2018-02-27 12:04:11 +08:00

26 lines
500 B
Go

package test
func init() {
nilSlice := []string(nil)
marshalCases = append(marshalCases,
[]interface{}{"hello"},
nilSlice,
&nilSlice,
selectedMarshalCase{[]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="`,
selected: true,
})
}