$ GOARCH=arm64 go test -v ./ -run TestJSONObjectToYAMLObject
=== RUN TestJSONObjectToYAMLObject
=== RUN TestJSONObjectToYAMLObject/nil
=== RUN TestJSONObjectToYAMLObject/empty
=== RUN TestJSONObjectToYAMLObject/values
--- FAIL: TestJSONObjectToYAMLObject (0.04s)
--- PASS: TestJSONObjectToYAMLObject/nil (0.01s)
--- PASS: TestJSONObjectToYAMLObject/empty (0.00s)
--- FAIL: TestJSONObjectToYAMLObject/values (0.02s)
yaml_test.go:489: jsonToYAML() = (yaml.MapSlice) (len=15 cap=15) {
(yaml.MapItem) {
Key: (string) (len=4) "bool",
Value: (bool) true
},
(yaml.MapItem) {
Key: (string) (len=9) "empty map",
Value: (yaml.MapSlice) <nil>
},
(yaml.MapItem) {
Key: (string) (len=11) "empty slice",
Value: ([]interface {}) {
}
},
(yaml.MapItem) {
Key: (string) (len=7) "float64",
Value: (float64) 42.1
},
(yaml.MapItem) {
Key: (string) (len=12) "fractionless",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=3) "int",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=5) "int64",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=9) "int64 big",
Value: (int) 4611686018427387904
},
(yaml.MapItem) {
Key: (string) (len=3) "map",
Value: (yaml.MapSlice) (len=1 cap=1) {
(yaml.MapItem) {
Key: (string) (len=3) "foo",
Value: (string) (len=3) "bar"
}
}
},
(yaml.MapItem) {
Key: (string) (len=18) "negative int64 big",
Value: (int) -4611686018427387904
},
(yaml.MapItem) {
Key: (string) (len=7) "nil map",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=9) "nil slice",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=5) "slice",
Value: ([]interface {}) (len=2 cap=2) {
(string) (len=3) "foo",
(string) (len=3) "bar"
}
},
(yaml.MapItem) {
Key: (string) (len=6) "string",
Value: (string) (len=3) "foo"
},
(yaml.MapItem) {
Key: (string) (len=10) "uint64 big",
Value: (int) 9223372036854775807
}
}
, want (yaml.MapSlice) (len=15 cap=15) {
(yaml.MapItem) {
Key: (string) (len=4) "bool",
Value: (bool) true
},
(yaml.MapItem) {
Key: (string) (len=9) "empty map",
Value: (yaml.MapSlice) <nil>
},
(yaml.MapItem) {
Key: (string) (len=11) "empty slice",
Value: ([]interface {}) {
}
},
(yaml.MapItem) {
Key: (string) (len=7) "float64",
Value: (float64) 42.1
},
(yaml.MapItem) {
Key: (string) (len=12) "fractionless",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=3) "int",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=5) "int64",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=9) "int64 big",
Value: (int) 4611686018427387904
},
(yaml.MapItem) {
Key: (string) (len=3) "map",
Value: (yaml.MapSlice) (len=1 cap=1) {
(yaml.MapItem) {
Key: (string) (len=3) "foo",
Value: (string) (len=3) "bar"
}
}
},
(yaml.MapItem) {
Key: (string) (len=18) "negative int64 big",
Value: (int) -4611686018427387904
},
(yaml.MapItem) {
Key: (string) (len=7) "nil map",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=9) "nil slice",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=5) "slice",
Value: ([]interface {}) (len=2 cap=2) {
(string) (len=3) "foo",
(string) (len=3) "bar"
}
},
(yaml.MapItem) {
Key: (string) (len=6) "string",
Value: (string) (len=3) "foo"
},
(yaml.MapItem) {
Key: (string) (len=10) "uint64 big",
Value: (uint64) 9223372036854775808
}
}
yaml_test.go:528: yaml.Unmarshal(json.Marshal(tt.input)) = (yaml.MapSlice) (len=15 cap=16) {
(yaml.MapItem) {
Key: (string) (len=4) "bool",
Value: (bool) true
},
(yaml.MapItem) {
Key: (string) (len=9) "empty map",
Value: (yaml.MapSlice) <nil>
},
(yaml.MapItem) {
Key: (string) (len=11) "empty slice",
Value: ([]interface {}) {
}
},
(yaml.MapItem) {
Key: (string) (len=7) "float64",
Value: (float64) 42.1
},
(yaml.MapItem) {
Key: (string) (len=12) "fractionless",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=3) "int",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=5) "int64",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=9) "int64 big",
Value: (int) 4611686018427388000
},
(yaml.MapItem) {
Key: (string) (len=3) "map",
Value: (yaml.MapSlice) (len=1 cap=1) {
(yaml.MapItem) {
Key: (string) (len=3) "foo",
Value: (string) (len=3) "bar"
}
}
},
(yaml.MapItem) {
Key: (string) (len=18) "negative int64 big",
Value: (int) -4611686018427388000
},
(yaml.MapItem) {
Key: (string) (len=7) "nil map",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=9) "nil slice",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=5) "slice",
Value: ([]interface {}) (len=2 cap=2) {
(string) (len=3) "foo",
(string) (len=3) "bar"
}
},
(yaml.MapItem) {
Key: (string) (len=6) "string",
Value: (string) (len=3) "foo"
},
(yaml.MapItem) {
Key: (string) (len=10) "uint64 big",
Value: (uint64) 9223372036854776000
}
}
, want (yaml.MapSlice) (len=15 cap=15) {
(yaml.MapItem) {
Key: (string) (len=4) "bool",
Value: (bool) true
},
(yaml.MapItem) {
Key: (string) (len=9) "empty map",
Value: (yaml.MapSlice) <nil>
},
(yaml.MapItem) {
Key: (string) (len=11) "empty slice",
Value: ([]interface {}) {
}
},
(yaml.MapItem) {
Key: (string) (len=7) "float64",
Value: (float64) 42.1
},
(yaml.MapItem) {
Key: (string) (len=12) "fractionless",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=3) "int",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=5) "int64",
Value: (int) 42
},
(yaml.MapItem) {
Key: (string) (len=9) "int64 big",
Value: (int) 4611686018427388000
},
(yaml.MapItem) {
Key: (string) (len=3) "map",
Value: (yaml.MapSlice) (len=1 cap=1) {
(yaml.MapItem) {
Key: (string) (len=3) "foo",
Value: (string) (len=3) "bar"
}
}
},
(yaml.MapItem) {
Key: (string) (len=18) "negative int64 big",
Value: (int) -4611686018427388000
},
(yaml.MapItem) {
Key: (string) (len=7) "nil map",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=9) "nil slice",
Value: (interface {}) <nil>
},
(yaml.MapItem) {
Key: (string) (len=5) "slice",
Value: ([]interface {}) (len=2 cap=2) {
(string) (len=3) "foo",
(string) (len=3) "bar"
}
},
(yaml.MapItem) {
Key: (string) (len=6) "string",
Value: (string) (len=3) "foo"
},
(yaml.MapItem) {
Key: (string) (len=10) "uint64 big",
Value: (int) -9223372036854775000
}
}
json: {"bool":true,"empty map":{},"empty slice":[],"float64":42.1,"fractionless":42,"int":42,"int64":42,"int64 big":4611686018427388000,"map":{"foo":"bar"},"negative int64 big":-4611686018427388000,"nil map":null,"nil slice":null,"slice":["foo","bar"],"string":"foo","uint64 big":9223372036854776000}
FAIL
FAIL sigs.k8s.io/yaml 0.104s
FAIL