structs_test.go
changeset 21 8f6ae5cfc9b9
parent 12 122ab6208c3c
child 22 d6b7b4cbf50d
equal deleted inserted replaced
20:e119444a1119 21:8f6ae5cfc9b9
    81 		`" xml:lang="pt">things happen</text></stream:error>`
    81 		`" xml:lang="pt">things happen</text></stream:error>`
    82 	assertMarshal(t, exp, e)
    82 	assertMarshal(t, exp, e)
    83 }
    83 }
    84 
    84 
    85 func TestIqMarshal(t *testing.T) {
    85 func TestIqMarshal(t *testing.T) {
    86 	iq := &Iq{Type: "set", Id: "3", Any: &Unrecognized{XMLName:
    86 	iq := &Iq{Type: "set", Id: "3", Any: &Generic{XMLName:
    87 			xml.Name{Space: nsBind, Local: "bind"}}}
    87 			xml.Name{Space: nsBind, Local: "bind"}}}
    88 	exp := `<iq id="3" type="set"><bind xmlns="` + nsBind +
    88 	exp := `<iq id="3" type="set"><bind xmlns="` + nsBind +
    89 		`"></bind></iq>`
    89 		`"></bind></iq>`
    90 	assertMarshal(t, exp, iq)
    90 	assertMarshal(t, exp, iq)
    91 }
    91 }