all: make function comments match function names

Change-Id: Ideb9ef00e7bc660b005fc080973fd9f3d36c5a1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/589536
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
cuishuang 2024-06-02 00:51:35 +08:00 committed by Gopher Robot
parent 9b43bfbc51
commit 71751350b0
6 changed files with 7 additions and 7 deletions

View file

@ -1407,7 +1407,7 @@ func TestVeryBad2(t *testing.T) {
} }
} }
// TestCheckVeryBad checks the behavior of an extremely poorly behaved iterator, // TestVeryBadCheck checks the behavior of an extremely poorly behaved iterator,
// which also suppresses the exceptions from "Check" // which also suppresses the exceptions from "Check"
func TestVeryBadCheck(t *testing.T) { func TestVeryBadCheck(t *testing.T) {
result := veryBadCheck([]int{10, 20, 30, 40}) // even length result := veryBadCheck([]int{10, 20, 30, 40}) // even length

View file

@ -1078,7 +1078,7 @@ func TestHandshakeServerSNIGetCertificate(t *testing.T) {
runServerTestTLS12(t, test) runServerTestTLS12(t, test)
} }
// TestHandshakeServerSNICertForNameNotFound is similar to // TestHandshakeServerSNIGetCertificateNotFound is similar to
// TestHandshakeServerSNICertForName, but tests to make sure that when the // TestHandshakeServerSNICertForName, but tests to make sure that when the
// GetCertificate method doesn't return a cert, we fall back to what's in // GetCertificate method doesn't return a cert, we fall back to what's in
// the NameToCertificate map. // the NameToCertificate map.
@ -1096,7 +1096,7 @@ func TestHandshakeServerSNIGetCertificateNotFound(t *testing.T) {
runServerTestTLS12(t, test) runServerTestTLS12(t, test)
} }
// TestHandshakeServerSNICertForNameError tests to make sure that errors in // TestHandshakeServerSNIGetCertificateError tests to make sure that errors in
// GetCertificate result in a tls alert. // GetCertificate result in a tls alert.
func TestHandshakeServerSNIGetCertificateError(t *testing.T) { func TestHandshakeServerSNIGetCertificateError(t *testing.T) {
const errMsg = "TestHandshakeServerSNIGetCertificateError error" const errMsg = "TestHandshakeServerSNIGetCertificateError error"

View file

@ -668,7 +668,7 @@ func TestWriteErrors(t *testing.T) {
} }
} }
// TextX is a skeleton test that can be filled in for debugging one-off cases. // TestX is a skeleton test that can be filled in for debugging one-off cases.
// Do not remove. // Do not remove.
func TestX(t *testing.T) { func TestX(t *testing.T) {
const src = ` const src = `

View file

@ -199,7 +199,7 @@ func TestMarshalTableMismatch(t *testing.T) {
} }
} }
// TestSimple tests the slicing-by-8 algorithm. // TestSlicing tests the slicing-by-8 algorithm.
func TestSlicing(t *testing.T) { func TestSlicing(t *testing.T) {
tab := slicingMakeTable(IEEE) tab := slicingMakeTable(IEEE)
testGoldenIEEE(t, func(b []byte) uint32 { testGoldenIEEE(t, func(b []byte) uint32 {

View file

@ -52,7 +52,7 @@ func averageDelta(m0, m1 image.Image) int64 {
return averageDeltaBound(m0, m1, b, b) return averageDeltaBound(m0, m1, b, b)
} }
// averageDeltaBounds returns the average delta in RGB space. The average delta is // averageDeltaBound returns the average delta in RGB space. The average delta is
// calculated in the specified bounds. // calculated in the specified bounds.
func averageDeltaBound(m0, m1 image.Image, b0, b1 image.Rectangle) int64 { func averageDeltaBound(m0, m1 image.Image, b0, b1 image.Rectangle) int64 {
var sum, n int64 var sum, n int64

View file

@ -1262,7 +1262,7 @@ func (s *rangeState) hasRange(typ rangeType) bool {
return false return false
} }
// endsRange ends a special range in time on the goroutine. // endRange ends a special range in time on the goroutine.
// //
// This must line up with the start event type of the range the goroutine is currently in. // This must line up with the start event type of the range the goroutine is currently in.
func (s *rangeState) endRange(typ event.Type) (stringID, error) { func (s *rangeState) endRange(typ event.Type) (stringID, error) {