]> Cypherpunks repositories - gostls13.git/commit
testing: explain using a _test package
authorbyarbrough <bcynmelk+git@gmail.com>
Sat, 27 Aug 2022 23:02:31 +0000 (23:02 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 29 Aug 2022 20:08:10 +0000 (20:08 +0000)
commitf3a1f9220a8a5265842f5cb877c4dc6d08f75c68
treea540ac67df62b6213641870a3705471b0fe35a7a
parentc108a682ff4571d1fd45e9c05cfad7b9a6c86a3d
testing: explain using a _test package

The existing documentation did not explain the difference between
placing a _test.go file in the same package as what is being
tested vs. adding it to a separate _test package. This explains the
distinction and adds an example.

Concept is explained well here:  https://stackoverflow.com/a/31443271

Fixes #25223

Change-Id: Iebaba15207d8aa24f0b370d8dd4062eadb504b5c
GitHub-Last-Rev: 7f49c5f4624b358af8052272da8ac3240751ada0
GitHub-Pull-Request: golang/go#54160
Reviewed-on: https://go-review.googlesource.com/c/go/+/420415
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
src/testing/testing.go