]> Cypherpunks repositories - gostls13.git/commitdiff
testing: clarify that subtests are run as goroutines
authorMarcel van Lohuizen <mpvl@golang.org>
Tue, 30 May 2017 10:11:04 +0000 (12:11 +0200)
committerMarcel van Lohuizen <mpvl@golang.org>
Tue, 30 May 2017 16:28:16 +0000 (16:28 +0000)
Fixes #20394

Change-Id: Iabb2a53fd1ddb783e7fb5b60ced8482c2e2569c4
Reviewed-on: https://go-review.googlesource.com/44377
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/testing/testing.go

index aa620f42b8300eff04ce9992b614194f8a975192..7754d4e61f332f387d4e4ad2d132c141daba9aee 100644 (file)
@@ -748,11 +748,12 @@ func tRunner(t *T, fn func(t *T)) {
        t.finished = true
 }
 
-// Run runs f as a subtest of t called name. It reports whether f succeeded.
-// Run will block until all its parallel subtests have completed.
+// Run runs f as a subtest of t called name. It reports whether f succeeded. Run
+// runs f in a separate goroutine and will block until all its parallel subtests
+// have completed.
 //
-// Run may be called simultaneously from multiple goroutines, but all such
-// calls must happen before the outer test function for t returns.
+// Run may be called simultaneously from multiple goroutines, but all such calls
+// must happen before the outer test function for t returns.
 func (t *T) Run(name string, f func(t *T)) bool {
        atomic.StoreInt32(&t.hasSub, 1)
        testName, ok := t.context.match.fullName(&t.common, name)