Commit b5d4cffd authored by Gustavo Niemeyer's avatar Gustavo Niemeyer

encoding/xml: fix xml test tag usage

No real problem.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5717049
parent 2295554d
...@@ -136,12 +136,12 @@ type NamePrecedence struct { ...@@ -136,12 +136,12 @@ type NamePrecedence struct {
type XMLNameWithTag struct { type XMLNameWithTag struct {
XMLName Name `xml:"InXMLNameTag"` XMLName Name `xml:"InXMLNameTag"`
Value string ",chardata" Value string `xml:",chardata"`
} }
type XMLNameWithoutTag struct { type XMLNameWithoutTag struct {
XMLName Name XMLName Name
Value string ",chardata" Value string `xml:",chardata"`
} }
type NameInField struct { type NameInField struct {
...@@ -532,9 +532,9 @@ var marshalTests = []struct { ...@@ -532,9 +532,9 @@ var marshalTests = []struct {
InFieldName: "D", InFieldName: "D",
}, },
ExpectXML: `<Parent>` + ExpectXML: `<Parent>` +
`<InTag><Value>A</Value></InTag>` + `<InTag>A</InTag>` +
`<InXMLName><Value>B</Value></InXMLName>` + `<InXMLName>B</InXMLName>` +
`<InXMLNameTag><Value>C</Value></InXMLNameTag>` + `<InXMLNameTag>C</InXMLNameTag>` +
`<InFieldName>D</InFieldName>` + `<InFieldName>D</InFieldName>` +
`</Parent>`, `</Parent>`,
MarshalOnly: true, MarshalOnly: true,
...@@ -548,9 +548,9 @@ var marshalTests = []struct { ...@@ -548,9 +548,9 @@ var marshalTests = []struct {
InFieldName: "D", InFieldName: "D",
}, },
ExpectXML: `<Parent>` + ExpectXML: `<Parent>` +
`<InTag><Value>A</Value></InTag>` + `<InTag>A</InTag>` +
`<FromNameVal><Value>B</Value></FromNameVal>` + `<FromNameVal>B</FromNameVal>` +
`<InXMLNameTag><Value>C</Value></InXMLNameTag>` + `<InXMLNameTag>C</InXMLNameTag>` +
`<InFieldName>D</InFieldName>` + `<InFieldName>D</InFieldName>` +
`</Parent>`, `</Parent>`,
UnmarshalOnly: true, UnmarshalOnly: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment