aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2022-09-19 14:55:09 -0400
committerThan McIntosh <thanm@google.com>2022-09-29 14:13:26 +0000
commit9d6dc32edd03f24a3ecacfcf4cdf54f561834c33 (patch)
treeebdd3e7b71ca6faf763994aa37e7ec07f2cc3c5e /src/testing
parent690851ee3e48b85088698a9dbcc7dd112cef9eb5 (diff)
downloadgo-9d6dc32edd03f24a3ecacfcf4cdf54f561834c33.tar.xz
runtime/coverage: improve unit tests
Add a testpoint to cover support routines used to help implement "go test -cover". Change-Id: Ic28bf884a4e0d2c0a6d8fd04fc29c0c949227f21 Reviewed-on: https://go-review.googlesource.com/c/go/+/432315 Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/newcover.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testing/newcover.go b/src/testing/newcover.go
index e90b9c9805..1805f791e6 100644
--- a/src/testing/newcover.go
+++ b/src/testing/newcover.go
@@ -39,3 +39,10 @@ func coverReport2() {
os.Exit(2)
}
}
+
+// testGoCoverDir returns the value passed to the -test.gocoverdir
+// flag by the Go command, if goexperiment.CoverageRedesign is
+// in effect.
+func testGoCoverDir() string {
+ return *gocoverdir
+}