diff options
author | Russ Cox <rsc@golang.org> | 2011-11-01 21:45:37 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-11-01 21:45:37 -0400 |
commit | b4e35629ed7df3e4d0d10be60198b9c365ea7a34 (patch) | |
tree | 4474c3a3f8f5ea3448ba3e51b760e85a2f595fdb | |
parent | 758200f219641b2ca8af1a5264456a72124a1b21 (diff) | |
download | go-b4e35629ed7df3e4d0d10be60198b9c365ea7a34.tar.gz go-b4e35629ed7df3e4d0d10be60198b9c365ea7a34.zip |
http: avoid name error in test
R=adg
CC=golang-dev
https://golang.org/cl/5316070
-rw-r--r-- | src/pkg/http/request_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/http/request_test.go b/src/pkg/http/request_test.go index 175d6f170b..9be9efcc87 100644 --- a/src/pkg/http/request_test.go +++ b/src/pkg/http/request_test.go @@ -49,7 +49,7 @@ func TestPostQuery(t *testing.T) { type stringMap map[string][]string type parseContentTypeTest struct { contentType stringMap - error bool + err bool } var parseContentTypeTests = []parseContentTypeTest{ @@ -58,7 +58,7 @@ var parseContentTypeTests = []parseContentTypeTest{ {contentType: stringMap{"Content-Type": {"text/plain; boundary="}}}, { contentType: stringMap{"Content-Type": {"application/unknown"}}, - error: true, + err: true, }, } @@ -70,10 +70,10 @@ func TestPostContentTypeParsing(t *testing.T) { Body: ioutil.NopCloser(bytes.NewBufferString("body")), } err := req.ParseForm() - if !test.error && err != nil { + if !test.err && err != nil { t.Errorf("test %d: Unexpected error: %v", i, err) } - if test.error && err == nil { + if test.err && err == nil { t.Errorf("test %d should have returned error", i) } } |