[go] testing: clarify when Cleanup is called

2 views
Skip to first unread message

Ian Lance Taylor (Gerrit)

unread,
Apr 2, 2021, 5:58:04 PM4/2/21
to Carlo Alberto Ferraris, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Marcel van Lohuizen, Go Bot, golang-co...@googlegroups.com

Ian Lance Taylor submitted this change.

View Change

Approvals: Ian Lance Taylor: Looks good to me, approved Dmitri Shuralyov: Trusted
testing: clarify when Cleanup is called

Change-Id: I2ed394fccec83aac09a49673554cbf504787965b
Reviewed-on: https://go-review.googlesource.com/c/go/+/306810
Reviewed-by: Ian Lance Taylor <ia...@golang.org>
Trust: Dmitri Shuralyov <dmit...@golang.org>
---
M src/testing/testing.go
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/testing/testing.go b/src/testing/testing.go
index 056a8d2..851b118 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -876,7 +876,7 @@
}
}

-// Cleanup registers a function to be called when the test and all its
+// Cleanup registers a function to be called when the test (or subtest) and all its
// subtests complete. Cleanup functions will be called in last added,
// first called order.
func (c *common) Cleanup(f func()) {

To view, visit change 306810. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I2ed394fccec83aac09a49673554cbf504787965b
Gerrit-Change-Number: 306810
Gerrit-PatchSet: 2
Gerrit-Owner: Carlo Alberto Ferraris <ca...@strayorange.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Go Bot <go...@golang.org>
Gerrit-CC: Marcel van Lohuizen <mp...@golang.org>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages