package libvirt import ( "bytes" "encoding/xml" "testing" "github.com/davecgh/go-spew/spew" ) func init() { spew.Config.Indent = "\t" } func TestDefaultDomainMarshall(t *testing.T) { b := newDomainDef() buf := new(bytes.Buffer) enc := xml.NewEncoder(buf) enc.Indent(" ", " ") if err := enc.Encode(b); err != nil { t.Fatalf("could not marshall this:\n%s", spew.Sdump(b)) } }