mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
d45298671f
commit
29918e85ab
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue