diff options
| author | Shulhan <m.shulhan@gmail.com> | 2024-02-07 13:10:08 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2026-02-03 18:04:31 +0700 |
| commit | 3b913562dd71bec7d9e5bb50c3834ccc8c3dd3f9 (patch) | |
| tree | 240aca8ac865de0a7480b0742f824d308463bace /src/testing/testing.go | |
| parent | c1b21b3cccfeed8f8f6762410479ac03864cd30c (diff) | |
| download | go-3b913562dd71bec7d9e5bb50c3834ccc8c3dd3f9.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.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index 34b45b41b9..7c296c3387 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -2579,6 +2579,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 { |
