MCPcopy
hub / github.com/go-yaml/yaml / TestDecoderErrors

Method TestDecoderErrors

decode_test.go:975–981  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

973}
974
975func (s *S) TestDecoderErrors(c *C) {
976 for _, item := range unmarshalErrorTests {
977 var value interface{}
978 err := yaml.NewDecoder(strings.NewReader(item.data)).Decode(&value)
979 c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value))
980 }
981}
982
983var unmarshalerTests = []struct {
984 data, tag string

Callers

nothing calls this directly

Calls 1

DecodeMethod · 0.45

Tested by

no test coverage detected