From 9d6dc32edd03f24a3ecacfcf4cdf54f561834c33 Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Mon, 19 Sep 2022 14:55:09 -0400 Subject: 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 --- src/testing/newcover.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/testing') 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 +} -- cgit v1.3-5-g9baa