aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
authorGerrit Code Review <noreply-gerritcodereview@google.com>2021-08-12 20:22:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-08-12 20:22:27 +0000
commit4d3cc84774549d26e52cbba3a0ffc50d3ede80d5 (patch)
treede3466e3b835e2c18fa03548ddf0619f5555575b /src/testing/testing.go
parent7e9f911ec4fd08ce9b4296f0aea4864b53064573 (diff)
parenta64ab8d3ecb38e10007e136edc9dc3abde873e1e (diff)
downloadgo-4d3cc84774549d26e52cbba3a0ffc50d3ede80d5.tar.gz
go-4d3cc84774549d26e52cbba3a0ffc50d3ede80d5.zip
Merge "[dev.typeparams] all: merge master (46fd547) into dev.typeparams" into dev.typeparamsdev.typeparams
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index 681f99ef93..a19238d31e 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -680,7 +680,11 @@ type T struct {
func (c *common) private() {}
-// Name returns the name of the running test or benchmark.
+// Name returns the name of the running (sub-) test or benchmark.
+//
+// The name will include the name of the test along with the names of
+// any nested sub-tests. If two sibling sub-tests have the same name,
+// Name will append a suffix to guarantee the returned name is unique.
func (c *common) Name() string {
return c.name
}