]> Cypherpunks repositories - gostls13.git/commitdiff
testing: use "exit code" in documentation consistently
authorRodolfo Carvalho <rhcarvalho@gmail.com>
Tue, 17 Mar 2020 10:41:45 +0000 (10:41 +0000)
committerIan Lance Taylor <iant@golang.org>
Tue, 17 Mar 2020 20:48:23 +0000 (20:48 +0000)
The documentation for m.Run says it returns an "exit code" to pass to
os.Exit. The argument to os.Exit is named "code".

While "exit code", "exit status" and "exit status code" are all valid ways
to refer to the same concept, prefer to stick to one form for consistency
and to avoid confusing users.

Change-Id: If76ee3fab5cc99c79e05ac1a4e413790a9c93d60
GitHub-Last-Rev: 85a081d2f03c2cf9e8e519916986c59c86aebf57
GitHub-Pull-Request: golang/go#37899
Reviewed-on: https://go-review.googlesource.com/c/go/+/223778
Reviewed-by: Gabriel Aszalos <gabriel.aszalos@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Gabriel Aszalos <gabriel.aszalos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/testing/testing.go

index 039d3e6209099a1df26a0287a109205ae7391254..5c78d9b7417d4fee90371c595037f5578c93dcc7 100644 (file)
 // then the generated test will call TestMain(m) instead of running the tests
 // 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
-// status that may be passed to os.Exit. If TestMain returns, the test wrapper
+// code that may be passed to os.Exit. If TestMain returns, the test wrapper
 // will pass the result of m.Run to os.Exit itself. When TestMain is called,
 // flag.Parse has not been run. If TestMain depends on command-line flags,
 // including those of the testing package, it should call flag.Parse explicitly.