--- a/xmpp/structs_test.go Thu Oct 17 22:41:08 2013 -0600
+++ b/xmpp/structs_test.go Fri Oct 18 18:31:18 2013 -0600
@@ -108,8 +108,8 @@
}
func TestMarshalEscaping(t *testing.T) {
- msg := &Message{Body: &Generic{XMLName: xml.Name{Local: "body"},
- Chardata: `&<!-- "`}}
+ msg := &Message{Body: []Text{Text{XMLName: xml.Name{Local: "body"},
+ Chardata: `&<!-- "`}}}
exp := `<message xmlns="jabber:client"><body>&<!-- "</body></message>`
assertMarshal(t, exp, msg)
}
@@ -123,8 +123,8 @@
obs := <-ch
exp := &Message{XMLName: xml.Name{Local: "message", Space: "jabber:client"},
Header: Header{To: "a@b.c", Innerxml: "<body>foo!</body>"},
- Body: &Generic{XMLName: xml.Name{Local: "body", Space: "jabber:client"},
- Chardata: "foo!"}}
+ Body: []Text{Text{XMLName: xml.Name{Local: "body", Space: "jabber:client"},
+ Chardata: "foo!"}}}
if !reflect.DeepEqual(obs, exp) {
t.Errorf("read %s\ngot: %#v\nwant: %#v\n", str, obs, exp)
}