1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00
This commit is contained in:
Tao Wen
2016-12-11 15:53:35 +08:00
parent 2895fe2215
commit 3e47c79b7e
6 changed files with 190 additions and 80 deletions

View File

@ -28,9 +28,9 @@ func Test_read_map_of_interface(t *testing.T) {
func Test_read_map_of_any(t *testing.T) {
iter := ParseString(`{"hello": "world"}`)
m := map[string]Any{"1": any("2")}
m := map[string]Any{"1": *MakeAny("2")}
iter.Read(&m)
if !reflect.DeepEqual(map[string]Any{"1": any("2"), "hello": any("world")}, m) {
if !reflect.DeepEqual(map[string]Any{"1": *MakeAny("2"), "hello": *MakeAny("world")}, m) {
fmt.Println(iter.Error)
t.Fatal(m)
}