diff options
author | Jes Cok <xigua67damn@gmail.com> | 2024-04-25 00:53:19 +0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-04-25 01:02:12 +0000 |
commit | 4351af68eb053973f8782bf1514358e4a8d1ab00 (patch) | |
tree | 7dbb7968419000c8012f1f6f625dc5fb70929d10 | |
parent | e7aeeae0c89f5bae76ba263b1ab2b82c56ad32a3 (diff) | |
download | go-4351af68eb053973f8782bf1514358e4a8d1ab00.tar.gz go-4351af68eb053973f8782bf1514358e4a8d1ab00.zip |
net/http: improve continue statements for tests
Change-Id: I302368c17fbb6983bd14ab72784076e548ed8829
Reviewed-on: https://go-review.googlesource.com/c/go/+/581475
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
-rw-r--r-- | src/net/http/cookie_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/net/http/cookie_test.go b/src/net/http/cookie_test.go index fdbe2723e3..1817fe1507 100644 --- a/src/net/http/cookie_test.go +++ b/src/net/http/cookie_test.go @@ -170,7 +170,6 @@ func TestWriteSetCookies(t *testing.T) { for i, tt := range writeSetCookiesTests { if g, e := tt.Cookie.String(), tt.Raw; g != e { t.Errorf("Test %d, expecting:\n%s\nGot:\n%s\n", i, e, g) - continue } } @@ -247,7 +246,6 @@ func TestAddCookie(t *testing.T) { } if g := req.Header.Get("Cookie"); g != tt.Raw { t.Errorf("Test %d:\nwant: %s\n got: %s\n", i, tt.Raw, g) - continue } } } @@ -407,7 +405,6 @@ func TestReadSetCookies(t *testing.T) { c := readSetCookies(tt.Header) if !reflect.DeepEqual(c, tt.Cookies) { t.Errorf("#%d readSetCookies: have\n%s\nwant\n%s\n", i, toJSON(c), toJSON(tt.Cookies)) - continue } } } @@ -477,7 +474,6 @@ func TestReadCookies(t *testing.T) { c := readCookies(tt.Header, tt.Filter) if !reflect.DeepEqual(c, tt.Cookies) { t.Errorf("#%d readCookies:\nhave: %s\nwant: %s\n", i, toJSON(c), toJSON(tt.Cookies)) - continue } } } @@ -883,6 +879,7 @@ func TestParseSetCookie(t *testing.T) { gotCookie, gotErr := ParseSetCookie(tt.line) if !errors.Is(gotErr, tt.err) { t.Errorf("#%d ParseSetCookie got error %v, want error %v", i, gotErr, tt.err) + continue } if !reflect.DeepEqual(gotCookie, tt.cookie) { t.Errorf("#%d ParseSetCookie:\ngot cookie: %s\nwant cookie: %s\n", i, toJSON(gotCookie), toJSON(tt.cookie)) |