aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/coverage/testsupport.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/coverage/testsupport.go')
-rw-r--r--src/runtime/coverage/testsupport.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/coverage/testsupport.go b/src/runtime/coverage/testsupport.go
index 4b00f3a0f7..b673d3cd2c 100644
--- a/src/runtime/coverage/testsupport.go
+++ b/src/runtime/coverage/testsupport.go
@@ -22,6 +22,9 @@ import (
"unsafe"
)
+// processCoverTestDir is injected in testmain.
+//go:linkname processCoverTestDir
+
// processCoverTestDir is called (via a linknamed reference) from
// testmain code when "go test -cover" is in effect. It is not
// intended to be used other than internally by the Go command's
@@ -277,6 +280,9 @@ func (ts *tstate) readAuxMetaFiles(metafiles string, importpaths map[string]stru
return nil
}
+// snapshot is injected in testmain.
+//go:linkname snapshot
+
// snapshot returns a snapshot of coverage percentage at a moment of
// time within a running test, so as to support the testing.Coverage()
// function. This version doesn't examine coverage meta-data, so the