diff options
Diffstat (limited to 'libgo/go/encoding/json/tagkey_test.go')
-rw-r--r-- | libgo/go/encoding/json/tagkey_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/go/encoding/json/tagkey_test.go b/libgo/go/encoding/json/tagkey_test.go index c1739ea97f7..f77c49c7647 100644 --- a/libgo/go/encoding/json/tagkey_test.go +++ b/libgo/go/encoding/json/tagkey_test.go @@ -44,6 +44,10 @@ type punctuationTag struct { V string `json:"!#$%&()*+-./:<=>?@[]^_{|}~"` // https://golang.org/issue/3546 } +type dashTag struct { + V string `json:"-,"` +} + type emptyTag struct { W string } @@ -80,6 +84,7 @@ var structTagObjectKeyTests = []struct { {basicLatin6xTag{"6x"}, "6x", "abcdefghijklmno"}, {basicLatin7xTag{"7x"}, "7x", "pqrstuvwxyz"}, {miscPlaneTag{"いろはにほへと"}, "いろはにほへと", "色は匂へど"}, + {dashTag{"foo"}, "foo", "-"}, {emptyTag{"Pour Moi"}, "Pour Moi", "W"}, {misnamedTag{"Animal Kingdom"}, "Animal Kingdom", "X"}, {badFormatTag{"Orfevre"}, "Orfevre", "Y"}, |