aboutsummaryrefslogtreecommitdiff
path: root/src/testing/sub_test.go
diff options
context:
space:
mode:
authorMarcel van Lohuizen <mpvl@golang.org>2016-01-29 16:57:02 +0100
committerMarcel van Lohuizen <mpvl@golang.org>2016-03-22 14:47:39 +0000
commit00a2a94c1eab027bc1ac5bbb9f30329dec14cf87 (patch)
tree91d97c16e311a62de0c3ffad2eed26bd23a63689 /src/testing/sub_test.go
parent34699bc7a81668f3a3d7b0f862e0a9f173926c66 (diff)
downloadgo-00a2a94c1eab027bc1ac5bbb9f30329dec14cf87.tar.xz
testing: added name matcher and sanitizer
The matcher is responsible for sanitizing and uniquing the test and benchmark names and thus needs to be included before the API can be exposed. Matching currently uses the regexp to only match the top-level tests/benchmarks. Support for subtest matching is for another CL. Change-Id: I7c8464068faef7ebc179b03a7fe3d01122cc4f0b Reviewed-on: https://go-review.googlesource.com/18897 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/testing/sub_test.go')
-rw-r--r--src/testing/sub_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go
index 07f6785c13..58def85441 100644
--- a/src/testing/sub_test.go
+++ b/src/testing/sub_test.go
@@ -6,6 +6,7 @@ package testing
import (
"io/ioutil"
+ "regexp"
"sync/atomic"
"time"
)
@@ -305,11 +306,12 @@ func TestTRun(t *T) {
},
}}
for _, tc := range testCases {
- ctx := newTestContext(tc.maxPar)
+ ctx := newTestContext(tc.maxPar, newMatcher(regexp.MatchString, "", ""))
root := &T{
common: common{
- barrier: make(chan bool),
- w: ioutil.Discard,
+ signal: make(chan bool),
+ name: "Test",
+ w: ioutil.Discard,
},
context: ctx,
}