From: Russ Cox Date: Thu, 14 Dec 2017 01:08:03 +0000 (-0500) Subject: testing: emphasize that Fatal/FailNow/etc run deferred calls X-Git-Tag: go1.10beta2~115 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=29918e85abe5cca2349788d0ddb12195f8b59a1b;p=gostls13.git testing: emphasize that Fatal/FailNow/etc run deferred calls Fixes #22989. Change-Id: I9776a7b0d0598c2cb118c323d1f8f933665da254 Reviewed-on: https://go-review.googlesource.com/83881 Run-TryBot: Russ Cox Reviewed-by: Ian Lance Taylor Reviewed-by: Rob Pike --- diff --git a/src/testing/testing.go b/src/testing/testing.go index 1c3ed20585..13937b6ad4 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -520,7 +520,8 @@ func (c *common) Failed() bool { } // FailNow marks the function as having failed and stops its execution -// by calling runtime.Goexit. +// by calling runtime.Goexit (which then runs all deferred calls in the +// current goroutine). // Execution will continue at the next test or benchmark. // FailNow must be called from the goroutine running the // test or benchmark function, not from other goroutines