diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-09-13 13:13:44 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-09-13 13:13:44 +0200 |
| commit | 9464a0c36318f8a801c07d6874bd0cea40f12504 (patch) | |
| tree | f0178491c19d4f1ebc7b92eede86690998466480 /src/pkg/xml/marshal_test.go | |
| parent | ba9fda6068cfadd42db0b152fdca7e8b67aaf77d (diff) | |
| parent | 5ff4c17907d5b19510a62e08fd8d3b11e62b431d (diff) | |
| download | golang-9464a0c36318f8a801c07d6874bd0cea40f12504.tar.gz | |
Merge commit 'upstream/60' into debian-sid
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{ |
