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 {
type XMLNameWithTag struct {
XMLName Name `xml:"InXMLNameTag"`
Value string ",chardata"
Value string `xml:",chardata"`
}
type XMLNameWithoutTag struct {
XMLName Name
Value string ",chardata"
Value string `xml:",chardata"`
}
type NameInField struct {
......@@ -532,9 +532,9 @@ var marshalTests = []struct {
InFieldName: "D",
},
ExpectXML: `<Parent>` +
`<InTag><Value>A</Value></InTag>` +
`<InXMLName><Value>B</Value></InXMLName>` +
`<InXMLNameTag><Value>C</Value></InXMLNameTag>` +
`<InTag>A</InTag>` +
`<InXMLName>B</InXMLName>` +
`<InXMLNameTag>C</InXMLNameTag>` +
`<InFieldName>D</InFieldName>` +
`</Parent>`,
MarshalOnly: true,
......@@ -548,9 +548,9 @@ var marshalTests = []struct {
InFieldName: "D",
},
ExpectXML: `<Parent>` +
`<InTag><Value>A</Value></InTag>` +
`<FromNameVal><Value>B</Value></FromNameVal>` +
`<InXMLNameTag><Value>C</Value></InXMLNameTag>` +
`<InTag>A</InTag>` +
`<FromNameVal>B</FromNameVal>` +
`<InXMLNameTag>C</InXMLNameTag>` +
`<InFieldName>D</InFieldName>` +
`</Parent>`,
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