xmpp/structs_test.go
changeset 172 36a42bc073f0
parent 163 3f891f7fe817
child 178 ccfebbd9f49b
--- 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>&amp;&lt;!-- &#34;</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)
 	}