Home | History | Annotate | Download | only in http

Lines Matching refs:tt

364 	for _, tt := range serveMuxTests {
366 Method: tt.method,
367 Host: tt.host,
369 Path: tt.path,
375 if pattern != tt.pattern || rr.Code != tt.code {
376 t.Errorf("%s %s %s = %d, %q, want %d, %q", tt.method, tt.host, tt.path, rr.Code, pattern, tt.code, tt.pattern)
402 for _, tt := range serveMuxTests2 {
404 turl := tt.url
411 Method: tt.method,
412 Host: tt.host,
419 if rr.Code != tt.code {
420 t.Errorf("%s %s %s = %d, want %d", tt.method, tt.host, tt.url, rr.Code, tt.code)
424 if !tt.redirOk {
425 t.Errorf("%s %s %s, unexpected redirect", tt.method, tt.host, tt.url)
432 t.Errorf("%s %s %s, too many redirects", tt.method, tt.host, tt.url)
1623 for i, tt := range handlerBodyCloseTests {
1624 testHandlerBodyClose(t, i, tt)
1628 func testHandlerBodyClose(t *testing.T, i int, tt handlerBodyCloseTest) {
1630 body := strings.Repeat("x", tt.bodySize)
1631 if tt.bodyChunked {
1634 tt.connectionHeader() +
1645 tt.connectionHeader()+
1650 if !tt.reqConnClose {
1677 if didSearch != tt.wantEOFSearch {
1680 if tt.wantNextReq && numReqs != 2 {
2194 for _, tt := range tests {
2196 Redirect(rec, req, tt.in, 302)
2197 if got := rec.Header().Get("Location"); got != tt.want {
2198 t.Errorf("Redirect(%q) generated Location header %q; want %q", tt.in, got, tt.want)
3276 for _, tt := range tests {
3282 _, err = fmt.Fprint(conn, tt.req)
3295 if !reflect.DeepEqual(got, tt.expect) {
3296 t.Errorf("wrong Connection headers for request %q. Got %q expect %q", tt.req, got, tt.expect)
4178 for _, tt := range tests {
4181 if !strings.HasPrefix(tt.proto, "HTTP/") {
4184 io.WriteString(&conn.readBuf, methodTarget+tt.proto+"\r\n"+tt.host+"\r\n")
4195 t.Errorf("For %s %q, ReadResponse: %v", tt.proto, tt.host, res)
4198 if res.StatusCode != tt.want {
4199 t.Errorf("For %s %q, Status = %d; want %d", tt.proto, tt.host, res.StatusCode, tt.want)
4267 for _, tt := range tests {
4269 io.WriteString(&conn.readBuf, "GET / HTTP/1.1\r\nHost: foo\r\n"+tt.header+"\r\n")
4280 t.Errorf("For %q, ReadResponse: %v", tt.header, res)
4283 if res.StatusCode != tt.want {
4284 t.Errorf("For %q, Status = %d; want %d", tt.header, res.StatusCode, tt.want)