package feed import ( "reflect" "strings" "testing" ) func TestRDFFeed(t *testing.T) { have, _ := ParseRDF(strings.NewReader(` Mozilla Dot Org http://www.mozilla.org the Mozilla Organization web site Mozilla http://www.mozilla.org/images/moz.gif http://www.mozilla.org New Status Updates http://www.mozilla.org/status/ Bugzilla Reorganized http://www.mozilla.org/bugs/ `)) want := &Feed{ Title: "Mozilla Dot Org", SiteURL: "http://www.mozilla.org", Items: []Item{ {GUID: "http://www.mozilla.org/status/", URL: "http://www.mozilla.org/status/", Title: "New Status Updates"}, {GUID: "http://www.mozilla.org/bugs/", URL: "http://www.mozilla.org/bugs/", Title: "Bugzilla Reorganized"}, }, } if !reflect.DeepEqual(want, have) { t.Logf("want: %#v", want) t.Logf("have: %#v", have) t.Fatal("invalid rdf") } }