Commit daf3f082 authored by Rob Pike's avatar Rob Pike

testing: add a method testing.CoverMode

This makes it possible to avoid tests where coverage affects the test
results by skipping them (or otherwise adjusting them) when coverage
is enabled.

Update #17699

Change-Id: Ifcc36cfcd88ebd677890e82ba80ee3d696ed3d7c
Reviewed-on: https://go-review.googlesource.com/32483Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent b06c93e4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment