From 20bf1a94e16402ccd29fb981dc68643a31353042 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Thu, 9 Aug 2012 23:41:09 +0800 Subject: [PATCH] testing: add Verbose() to expose whether -test.v is set Fixes #3350. R=golang-dev, adg, r, fullung CC=golang-dev https://golang.org/cl/6445092 --- src/pkg/testing/testing.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go index e56b77c9c77..2334ffc45a4 100644 --- a/src/pkg/testing/testing.go +++ b/src/pkg/testing/testing.go @@ -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 {