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>
diff --git a/src/net/http/cookie_test.go b/src/net/http/cookie_test.go
index fdbe2723..1817fe1 100644
--- a/src/net/http/cookie_test.go
+++ b/src/net/http/cookie_test.go
@@ -170,7 +170,6 @@
 	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 @@
 		}
 		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 @@
 			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 @@
 			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 @@
 		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))