Benchmark marshal (#550)

This commit is contained in:
Thomas Pelletier
2021-06-02 09:29:19 -04:00
committed by GitHub
parent b0d6c62255
commit f3bb20ea79
6 changed files with 246 additions and 78 deletions
+15 -1
View File
@@ -688,7 +688,7 @@ B = "data"`,
"Name": "Hammer",
"Sku": int64(738594937),
},
nil,
map[string]interface{}(nil),
map[string]interface{}{
"Name": "Nail",
"Sku": int64(284758393),
@@ -1201,6 +1201,20 @@ B = "data"`,
}
},
},
{
desc: "empty array table in interface{}",
input: `[[products]]`,
gen: func() test {
return test{
target: &map[string]interface{}{},
expected: &map[string]interface{}{
"products": []interface{}{
map[string]interface{}(nil),
},
},
}
},
},
{
desc: "into map with invalid key type",
input: `A = "hello"`,