]> Cypherpunks.ru repositories - gostls13.git/commit
testing: clarify in docs that TestMain is advanced
authorMatt T. Proud <matt.proud@gmail.com>
Wed, 14 Jul 2021 20:42:31 +0000 (22:42 +0200)
committerIan Lance Taylor <iant@golang.org>
Thu, 15 Jul 2021 20:39:22 +0000 (20:39 +0000)
commit0941dbca6ae805dd7b5f7871d5811b7b7f14f77f
tree6ece81cbcc6cf287677c0bb91bc2685921523685
parent69728ead871f15cc1fd7e70b67e6768dd1100bae
testing: clarify in docs that TestMain is advanced

Beginner and intermediate Go users periodically use TestMain when
requirements do not necessitate TestMain (exceeding least-mechanism
design). This commit expands package testing's documentation to convey
that the TestMain feature itself is somewhat low-level and potentially
unsuitable for casual testing where ordinary test functions would
suffice.

Fixes #42161
Updates #44200

Change-Id: I91ba0b048c3d6f79110fe8f0fbb58d896edca366
Reviewed-on: https://go-review.googlesource.com/c/go/+/334649
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/testing/testing.go