diff --git a/src/testing/testing.go b/src/testing/testing.go index 2146195956f..1562eadef08 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -208,14 +208,14 @@ // // Main // -// It is sometimes necessary for a test program to do extra setup or teardown -// before or after testing. It is also sometimes necessary for a test to control +// It is sometimes necessary for a test or benchmark program to do extra setup or teardown +// before or after it executes. It is also sometimes necessary to control // which code runs on the main thread. To support these and other cases, // if a test file contains a function: // // func TestMain(m *testing.M) // -// then the generated test will call TestMain(m) instead of running the tests +// then the generated test will call TestMain(m) instead of running the tests or benchmarks // directly. TestMain runs in the main goroutine and can do whatever setup // and teardown is necessary around a call to m.Run. m.Run will return an exit // code that may be passed to os.Exit. If TestMain returns, the test wrapper