]> Cypherpunks repositories - gostls13.git/commitdiff
http: avoid name error in test
authorRuss Cox <rsc@golang.org>
Wed, 2 Nov 2011 01:45:37 +0000 (21:45 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 2 Nov 2011 01:45:37 +0000 (21:45 -0400)
R=adg
CC=golang-dev
https://golang.org/cl/5316070

src/pkg/http/request_test.go

index 175d6f170b831ee3ac7ff51660dfe7c949b46c34..9be9efcc87d34c1df237732c40c7cfa804ba6585 100644 (file)
@@ -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)
                }
        }