+1
-13
@@ -488,18 +488,6 @@ func TestNestedEmptyArrays(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestArrayMixedTypes(t *testing.T) {
|
||||
_, err := Load("a = [42, 16.0]")
|
||||
if err.Error() != "(1, 10): mixed types in array" {
|
||||
t.Error("Bad error message:", err.Error())
|
||||
}
|
||||
|
||||
_, err = Load("a = [42, \"hello\"]")
|
||||
if err.Error() != "(1, 11): mixed types in array" {
|
||||
t.Error("Bad error message:", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func TestArrayNestedStrings(t *testing.T) {
|
||||
tree, err := Load("data = [ [\"gamma\", \"delta\"], [\"Foo\"] ]")
|
||||
assertTree(t, tree, err, map[string]interface{}{
|
||||
@@ -934,7 +922,7 @@ func TestTomlValueStringRepresentation(t *testing.T) {
|
||||
{[]interface{}{"gamma", "delta"}, "[\"gamma\",\"delta\"]"},
|
||||
{nil, ""},
|
||||
} {
|
||||
result, err := tomlValueStringRepresentation(item.Value, "", "", false)
|
||||
result, err := tomlValueStringRepresentation(item.Value, "", "", OrderPreserve, false)
|
||||
if err != nil {
|
||||
t.Errorf("Test %d - unexpected error: %s", idx, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user