mirror of
https://github.com/golang/go
synced 2024-11-27 02:31:18 -07:00
8f4bc468a7
The package doc for the testing package doesn't have a simple
example demonstrating how to write a test with an expectation. The doc
has simple examples for benchmarks, examples, and skipping, and it would be
useful for people new to writing tests in Go.
Also moved the skip example further down because it references tests and
benchmarks but benchmarks haven't been discussed in detail until the
next section. Skip is also a less used feature and it seems misplaced to
sit so high up in the package documentation. As an example, Skip is used
570 times the Go code repository which is significantly less than Error
and Fatal that are used 23,303 times.
Also changed 'sample' to 'simple' in other places in the package documentation
to keep the language used consistent when describing the small examples.
Fixes #27839
Change-Id: Ie01a3751986ee61adf2a2f2eda59cc182342baa7
GitHub-Last-Rev:
|
||
---|---|---|
.. | ||
internal/testdeps | ||
iotest | ||
quick | ||
allocs_test.go | ||
allocs.go | ||
benchmark_test.go | ||
benchmark.go | ||
cover.go | ||
example.go | ||
export_test.go | ||
helper_test.go | ||
helperfuncs_test.go | ||
match_test.go | ||
match.go | ||
sub_test.go | ||
testing_test.go | ||
testing.go |