Added a capability to use extensions. There are still some bugs with
marshaling involving receiver functions on embedded structs.
// Copyright 2011 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.packagexmppimport("testing""xml")// This is mostly just tests of the roster data structures.funcTestRosterIqMarshal(t*testing.T){iq:=&RosterIq{Iq:Iq{From:"from",Lang:"en"},Query:RosterQuery{XMLName:xml.Name{Space:NsRoster,Local:"query"},Item:[]RosterItem{}}}varsStanza=iqif_,ok:=s.(ExtendedStanza);!ok{t.Errorf("Not an ExtendedStanza")}exp:=`<iq from="from" xml:lang="en"><query xmlns="`+NsRoster+`"></query></iq>`assertMarshal(t,exp,iq)}