The testing.T type now has a Deadline method ... A TestMain function is no longer required to call os.Exit. ... The new methods T.TempDir and B.TempDir ... go test -v now groups output by test name, ... https://golang.org/doc/go1.15#testing
The testing.T type now has a Deadline method ... A TestMain function is no longer required to call os.Exit. ... The new methods T.TempDir and B.TempDir ... go test -v now groups output by test name, ... https://golang.org/doc/go1.15#testing Talk contents
> testing A TestMain function is no longer required to call os.Exit. If a TestMain function returns, the test binary will call os.Exit with the value returned by m.Run. https://golang.org/doc/go1.15#testing
mistake does happen a lot, and the testing package that called TestMain and prepared the m can certainly record the result of m.Run for use in its own outer os.Exit.” (@rsc Russ Cox)
> testing The testing.T type now has a Deadline method that reports the time at which the test binary will have exceeded its timeout. https://golang.org/doc/go1.15#testing
binary will have exceeded the timeout specified by the -timeout flag. The ok result is false if the -timeout flag indicates “no timeout” (0). % go test -v -timeout=5s -run=TestDeadlineConfirm t.Deadline() = 2020-08-31 18:37:39.502862 +0900 JST m=+5.000488349, timeout set = true $ go test -v -timeout=0 -run=TestDeadlineConfirm t.Deadline() = 0001-01-01 00:00:00 +0000 UTC, timeout set = false