- Sort Score
- Result 10 results
- Languages All
Results 11 - 15 of 15 for TestSum (0.2 sec)
-
src/image/color/color.go
// A batch version of this computation is in image/draw/draw.go. cr, cg, cb, ca := c.RGBA() ret, bestSum := 0, uint32(1<<32-1) for i, v := range p { vr, vg, vb, va := v.RGBA() sum := sqDiff(cr, vr) + sqDiff(cg, vg) + sqDiff(cb, vb) + sqDiff(ca, va) if sum < bestSum { if sum == 0 { return i } ret, bestSum = i, sum } } return ret }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 8.3K bytes - Viewed (0) -
src/mime/multipart/multipart_test.go
part, err := reader.NextPart() if part == nil { t.Errorf("Expected a body part on text %d", testNum) continue } if err != nil { t.Errorf("Unexpected error on text %d: %v", testNum, err) continue } written, err := io.Copy(buf, part) expectEq(t, expectedBody, buf.String(), fmt.Sprintf("test %d", testNum)) if err != nil { t.Errorf("Error copying multipart; bytes=%v, error=%v", written, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 17:36:47 UTC 2022 - 30.4K bytes - Viewed (0) -
src/crypto/tls/handshake_client_test.go
panic("AcceptableCAs should have been empty") } return new(Certificate), nil } }, "", func(t *testing.T, testNum int, cs *ConnectionState) { if l := len(cs.PeerCertificates); l != 0 { t.Errorf("#%d: expected no certificates but got %d", testNum, l) } }, }, { func(clientConfig, serverConfig *Config) { // With TLS 1.1, the SignatureSchemes should be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 88.7K bytes - Viewed (0) -
src/image/draw/draw.go
// the one that minimizes sum-squared-difference. // TODO(nigeltao): consider smarter algorithms. bestIndex, bestSum := 0, uint32(1<<32-1) for index, p := range palette { sum := sqDiff(er, p[0]) + sqDiff(eg, p[1]) + sqDiff(eb, p[2]) + sqDiff(ea, p[3]) if sum < bestSum { bestIndex, bestSum = index, sum if sum == 0 { break } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 17:08:05 UTC 2024 - 33.9K bytes - Viewed (0) -
src/net/http/transport_test.go
accept := req.Header.Get("Accept-Encoding") if expect := req.FormValue("expect_accept"); accept != expect { t.Errorf("in handler, test %v: Accept-Encoding = %q, want %q", req.FormValue("testnum"), accept, expect) } if accept == "gzip" { rw.Header().Set("Content-Encoding", "gzip") gz := gzip.NewWriter(rw) gz.Write([]byte(responseBody)) gz.Close() } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0)