aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2024-02-07 13:10:08 +0700
committerShulhan <m.shulhan@gmail.com>2026-04-14 21:51:40 +0700
commit329eb3a588e02e6078cb364d20f540072f509f04 (patch)
treefec70fb77838763c4024ad74e2942779a674bb4c /src/testing/testing.go
parent779b2c6eaca78a60f8e42ebc8a7c47c149f3a9cc (diff)
downloadgo-329eb3a588e02e6078cb364d20f540072f509f04.tar.xz
testing: print the counter if its greater than 1
When test run with "-count=Y" and Y is greater that 1, print a line to indicated the current round of test as "### X/Y".
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index 8b7742d85e..add2284edb 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -2733,6 +2733,10 @@ func runTests(modulePath, importPath string, matchString func(pat, str string) (
}
if Verbose() {
t.chatty = newChattyPrinter(t.w)
+
+ if *count > 1 {
+ fmt.Fprintf(t.w, "### %d/%d\n", i+1, *count)
+ }
}
tRunner(t, func(t *T) {
for _, test := range tests {