]> Cypherpunks repositories - gostls13.git/commitdiff
testing: add Verbose() to expose whether -test.v is set
authorShenghou Ma <minux.ma@gmail.com>
Thu, 9 Aug 2012 15:41:09 +0000 (23:41 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Thu, 9 Aug 2012 15:41:09 +0000 (23:41 +0800)
    Fixes #3350.

R=golang-dev, adg, r, fullung
CC=golang-dev
https://golang.org/cl/6445092

src/pkg/testing/testing.go

index e56b77c9c7778249560733d605020ea5e8f4f5e1..2334ffc45a4386b670906831f7ff7e9781d1997e 100644 (file)
@@ -132,6 +132,11 @@ func Short() bool {
        return *short
 }
 
+// Verbose reports whether the -test.v flag is set.
+func Verbose() bool {
+       return *chatty
+}
+
 // decorate prefixes the string with the file and line of the call site
 // and inserts the final newline if needed and indentation tabs for formatting.
 func decorate(s string) string {