Commit 1a6b1dd0 authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Russ Cox

xml: fix typo in test.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4218042
parent c1fdb6f1
...@@ -13,16 +13,16 @@ import ( ...@@ -13,16 +13,16 @@ import (
func TestUnmarshalFeed(t *testing.T) { func TestUnmarshalFeed(t *testing.T) {
var f Feed var f Feed
if err := Unmarshal(StringReader(rssFeedString), &f); err != nil { if err := Unmarshal(StringReader(atomFeedString), &f); err != nil {
t.Fatalf("Unmarshal: %s", err) t.Fatalf("Unmarshal: %s", err)
} }
if !reflect.DeepEqual(f, rssFeed) { if !reflect.DeepEqual(f, atomFeed) {
t.Fatalf("have %#v\nwant %#v", f, rssFeed) t.Fatalf("have %#v\nwant %#v", f, atomFeed)
} }
} }
// hget http://codereview.appspot.com/rss/mine/rsc // hget http://codereview.appspot.com/rss/mine/rsc
const rssFeedString = ` const atomFeedString = `
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><title>Code Review - My issues</title><link href="http://codereview.appspot.com/" rel="alternate"></link><li-nk href="http://codereview.appspot.com/rss/mine/rsc" rel="self"></li-nk><id>http://codereview.appspot.com/</id><updated>2009-10-04T01:35:58+00:00</updated><author><name>rietveld&lt;&gt;</name></author><entry><title>rietveld: an attempt at pubsubhubbub <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><title>Code Review - My issues</title><link href="http://codereview.appspot.com/" rel="alternate"></link><li-nk href="http://codereview.appspot.com/rss/mine/rsc" rel="self"></li-nk><id>http://codereview.appspot.com/</id><updated>2009-10-04T01:35:58+00:00</updated><author><name>rietveld&lt;&gt;</name></author><entry><title>rietveld: an attempt at pubsubhubbub
</title><link hre-f="http://codereview.appspot.com/126085" rel="alternate"></link><updated>2009-10-04T01:35:58+00:00</updated><author><name>email-address-removed</name></author><id>urn:md5:134d9179c41f806be79b3a5f7877d19a</id><summary type="html"> </title><link hre-f="http://codereview.appspot.com/126085" rel="alternate"></link><updated>2009-10-04T01:35:58+00:00</updated><author><name>email-address-removed</name></author><id>urn:md5:134d9179c41f806be79b3a5f7877d19a</id><summary type="html">
...@@ -115,7 +115,7 @@ type Text struct { ...@@ -115,7 +115,7 @@ type Text struct {
type Time string type Time string
var rssFeed = Feed{ var atomFeed = Feed{
XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
Title: "Code Review - My issues", Title: "Code Review - My issues",
Link: []Link{ Link: []Link{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment