diff -r 6d4f43f7dc19 -r 16513974d273 structs_test.go --- a/structs_test.go Sat Jan 07 21:20:23 2012 -0700 +++ b/structs_test.go Sat Jan 07 22:22:18 2012 -0700 @@ -83,8 +83,9 @@ } func TestIqMarshal(t *testing.T) { - iq := &Iq{Type: "set", Id: "3", Any: &Generic{XMLName: - xml.Name{Space: NsBind, Local: "bind"}}} + iq := &Iq{Type: "set", Id: "3", Nested: + []interface{}{Generic{XMLName: xml.Name{Space: NsBind, + Local: "bind"}}}} exp := `` assertMarshal(t, exp, iq) @@ -106,11 +107,10 @@ if st.GetError() != nil { t.Errorf("iq: error %v", st.GetError()) } - if st.generic() == nil { - t.Errorf("iq: nil child") + if st.innerxml() == "" { + t.Errorf("iq: empty child") } - assertEquals(t, "foo", st.generic().XMLName.Local) - assertEquals(t, "text", st.generic().Chardata) + assertEquals(t, "text", st.innerxml()) str = `` st, err = ParseStanza(str) @@ -125,8 +125,8 @@ if st.GetError() != nil { t.Errorf("message: error %v", st.GetError()) } - if st.generic() != nil { - t.Errorf("message: child %v", st.generic()) + if st.innerxml() != "" { + t.Errorf("message: child %v", st.innerxml()) } str = ``