aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/yaml.v2/decode_test.go
diff options
context:
space:
mode:
authorMilan Lenco <milan.lenco@pantheon.tech>2017-10-11 16:40:58 +0200
committerMilan Lenco <milan.lenco@pantheon.tech>2017-10-13 08:40:37 +0200
commit3f1edad4e6ba0a7876750aea55507fae14d8badf (patch)
treea473997249d9ba7deb70b1076d14e4c4ed029a43 /vendor/gopkg.in/yaml.v2/decode_test.go
parent8b66677c2382a8e739d437621de4473d5ec0b9f1 (diff)
ODPM 266: Go-libmemif + 2 examples.
Change-Id: Icdb9b9eb2314eff6c96afe7996fcf2728291de4a Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'vendor/gopkg.in/yaml.v2/decode_test.go')
-rw-r--r--vendor/gopkg.in/yaml.v2/decode_test.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go
index 713b1ee..a6fea0f 100644
--- a/vendor/gopkg.in/yaml.v2/decode_test.go
+++ b/vendor/gopkg.in/yaml.v2/decode_test.go
@@ -405,12 +405,6 @@ var unmarshalTests = []struct {
map[string]interface{}{"v": 1},
},
- // Non-specific tag (Issue #75)
- {
- "v: ! test",
- map[string]interface{}{"v": "test"},
- },
-
// Anchors and aliases.
{
"a: &x 1\nb: &y 2\nc: *x\nd: *y\n",
@@ -610,8 +604,7 @@ type inlineC struct {
}
func (s *S) TestUnmarshal(c *C) {
- for i, item := range unmarshalTests {
- c.Logf("test %d: %q", i, item.data)
+ for _, item := range unmarshalTests {
t := reflect.ValueOf(item.value).Type()
var value interface{}
switch t.Kind() {
@@ -655,7 +648,6 @@ var unmarshalErrorTests = []struct {
{"a: !!binary ==", "yaml: !!binary value contains invalid base64 data"},
{"{[.]}", `yaml: invalid map key: \[\]interface \{\}\{"\."\}`},
{"{{.}}", `yaml: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`},
- {"%TAG !%79! tag:yaml.org,2002:\n---\nv: !%79!int '1'", "yaml: did not find expected whitespace"},
}
func (s *S) TestUnmarshalErrors(c *C) {
@@ -976,17 +968,6 @@ func (s *S) TestUnmarshalSliceOnPreset(c *C) {
c.Assert(v.A, DeepEquals, []int{2})
}
-func (s *S) TestUnmarshalStrict(c *C) {
- v := struct{ A, B int }{}
-
- err := yaml.UnmarshalStrict([]byte("a: 1\nb: 2"), &v)
- c.Check(err, IsNil)
- err = yaml.Unmarshal([]byte("a: 1\nb: 2\nc: 3"), &v)
- c.Check(err, IsNil)
- err = yaml.UnmarshalStrict([]byte("a: 1\nb: 2\nc: 3"), &v)
- c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 1: field c not found in struct struct { A int; B int }")
-}
-
//var data []byte
//func init() {
// var err error