diff options
| author | Marcel van Lohuizen <mpvl@golang.org> | 2016-04-06 09:59:32 +0200 |
|---|---|---|
| committer | Marcel van Lohuizen <mpvl@golang.org> | 2016-04-06 17:10:33 +0000 |
| commit | 63cea5ac2b8ed0cf257c7bfe7ed13bdd42373a0c (patch) | |
| tree | 3f3d5f8319d1fa1d4412c7682f143a4880332d4c /src/testing/sub_test.go | |
| parent | d70cb46f0fde56ec0147c5cc679714fd63cb10bb (diff) | |
| download | go-63cea5ac2b8ed0cf257c7bfe7ed13bdd42373a0c.tar.xz | |
testing: fixed bug introduced by CL 21504
This broke T.Run
Change-Id: I12c8fe3612f3fa2caa83049c1c7003056daf2b0c
Reviewed-on: https://go-review.googlesource.com/21600
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/testing/sub_test.go')
| -rw-r--r-- | src/testing/sub_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go index e053a3c348..7fe0fffd8f 100644 --- a/src/testing/sub_test.go +++ b/src/testing/sub_test.go @@ -179,6 +179,22 @@ func TestTRun(t *T) { --- SKIP: skipping without message, chatty (0.00s)`, f: func(t *T) { t.SkipNow() }, }, { + desc: "chatty with recursion", + ok: true, + chatty: true, + output: ` +=== RUN chatty with recursion +=== RUN chatty with recursion/#00 +=== RUN chatty with recursion/#00/#00 +--- PASS: chatty with recursion (0.00s) + --- PASS: chatty with recursion/#00 (0.00s) + --- PASS: chatty with recursion/#00/#00 (0.00s)`, + f: func(t *T) { + t.Run("", func(t *T) { + t.Run("", func(t *T) {}) + }) + }, + }, { desc: "skipping without message, not chatty", ok: true, f: func(t *T) { t.SkipNow() }, @@ -436,6 +452,14 @@ func TestBRun(t *T) { sub_test.go:: skipping`, f: func(b *B) { b.Skip("skipping") }, }, { + desc: "chatty with recursion", + chatty: true, + f: func(b *B) { + b.Run("", func(b *B) { + b.Run("", func(b *B) {}) + }) + }, + }, { desc: "skipping without message, not chatty", f: func(b *B) { b.SkipNow() }, }, { |
