mirror of
https://github.com/golang/go
synced 2024-11-20 03:34:40 -07:00
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/32483 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
b06c93e45b
commit
daf3f08264
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user