go/src/testing
Daniel Martí 111064925b testing: comment out flag.Parse from example
The TestMain docs explain that flag.Parse() should be called if TestMain
itself depends on command-line flags.

The issue here is that the example implementation does not use any
flags, and thus the flag.Parse call is unnecessary. This leads to people
who use this example as a starting point for their own implementations
to forget that the call is not necessary in most cases.

Comment it out instead of removing the line to keep it as a reminder, as
suggested by Minux Ma.

Change-Id: I6ffc5413e7036366ae3cf0f069b7065e832a3b45
Reviewed-on: https://go-review.googlesource.com/33273
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-25 16:41:34 +00:00
..
internal/testdeps testing: introduce testing/internal/testdeps for holding testmain dependencies 2016-11-02 19:14:39 +00:00
iotest all: single space after period. 2016-03-02 00:13:47 +00:00
quick all: freeze net/rpc and reword the 'frozen' message in other frozen packages 2016-10-26 16:11:07 +00:00
allocs.go all: single space after period. 2016-03-02 00:13:47 +00:00
allocs_test.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
benchmark.go testing: add T.Context method 2016-11-03 21:14:30 +00:00
benchmark_test.go
cover.go
example.go cmd/go, testing: indicate when no tests are run 2016-10-19 02:34:44 +00:00
export_test.go
match.go testing: add matching of subtest 2016-04-21 19:58:31 +00:00
match_test.go testing: fix vet warning 2016-05-12 16:22:42 +00:00
sub_test.go testing: add T.Context method 2016-11-03 21:14:30 +00:00
testing.go testing: comment out flag.Parse from example 2016-11-25 16:41:34 +00:00
testing_test.go testing: add T.Context method 2016-11-03 21:14:30 +00:00