Add some tests for nested empty arrays

This commit is contained in:
Thomas Pelletier
2013-12-10 17:46:30 +01:00
parent a34fc5f051
commit 01609e0ab7
2 changed files with 21 additions and 0 deletions
+7
View File
@@ -142,6 +142,13 @@ func TestArrayNested(t *testing.T) {
})
}
func TestNestedEmptyArrays(t *testing.T) {
tree, err := Load("a = [[[]]]")
assertTree(t, tree, err, map[string]interface{}{
"a": [][][]interface{}{[][]interface{}{[]interface{}{}}},
})
}
func TestArrayMixedTypes(t *testing.T) {
_, err := Load("a = [42, 16.0]")
if err.Error() != "mixed types in array" {