diff options
Diffstat (limited to 'src/pkg/xml/marshal_test.go')
| -rw-r--r-- | src/pkg/xml/marshal_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/xml/marshal_test.go b/src/pkg/xml/marshal_test.go index 77b2e726d..5b972fafe 100644 --- a/src/pkg/xml/marshal_test.go +++ b/src/pkg/xml/marshal_test.go @@ -57,6 +57,11 @@ type Domain struct { Name []byte `xml:"chardata"` } +type Book struct { + XMLName Name `xml:"book"` + Title string `xml:"chardata"` +} + type SecretAgent struct { XMLName Name `xml:"agent"` Handle string `xml:"attr"` @@ -113,6 +118,7 @@ var marshalTests = []struct { {Value: &Port{Number: "443"}, ExpectXML: `<port>443</port>`}, {Value: &Port{Type: "<unix>"}, ExpectXML: `<port type="<unix>"></port>`}, {Value: &Domain{Name: []byte("google.com&friends")}, ExpectXML: `<domain>google.com&friends</domain>`}, + {Value: &Book{Title: "Pride & Prejudice"}, ExpectXML: `<book>Pride & Prejudice</book>`}, {Value: atomValue, ExpectXML: atomXml}, { Value: &Ship{ |
