aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index ce5b852364..c52884f0f4 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -283,6 +283,13 @@ func Short() bool {
return *short
}
+// CoverMode reports what the test coverage mode is set to. The
+// values are "set", "count", or "atomic". The return value will be
+// empty if test coverage is not enabled.
+func CoverMode() string {
+ return cover.Mode
+}
+
// Verbose reports whether the -test.v flag is set.
func Verbose() bool {
return *chatty