mirror of
https://github.com/golang/go.git
synced 2024-09-21 18:38:37 +00:00
doc: add release note on coverage testing of no-test packages
Add a small release note blurb to describe the changes in CL 495447 relating to "go test -cover" runs on packages with functions but no tests. For #61422. Change-Id: Ib8163ac70b902f0d7f9f470b944e7f70711e3cf3 Reviewed-on: https://go-review.googlesource.com/c/go/+/547635 Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
e418258993
commit
c002a5d8ab
@ -53,6 +53,25 @@ Do not send CLs removing the interior tags from such phrases.
|
|||||||
<!-- cmd/go: remove conversion of legacy pre-module dependency configs -->
|
<!-- cmd/go: remove conversion of legacy pre-module dependency configs -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<!-- CL 495447 -->
|
||||||
|
<p>
|
||||||
|
`go` `test` `-cover` now prints coverage summaries for covered
|
||||||
|
packages that do not have their own test files. Prior to Go 1.22 a
|
||||||
|
`go` `test` `-cover` run for such a package would report
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<code>? mymod/mypack [no test files]</code>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
and now with Go 1.22, functions in the package are treated as uncovered:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<code>mymod/mypack coverage: 0.0% of statements</code>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h3 id="cgo">Cgo</h3>
|
<h3 id="cgo">Cgo</h3>
|
||||||
|
|
||||||
<!-- https://go.dev/issue/56378 -->
|
<!-- https://go.dev/issue/56378 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user