In contrast to the HasSuffix argument, there's no need or benefit in
having a ":" before the "racebench" variant mentioned in the message.
(The variant comes after the colon separator—it doesn't include it.)
Change-Id: Ie9948104de9449422037bf39245944255b98f1b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/497735
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
if !strings.Contains(name, ":") && heading != "Testing packages." {
panic("empty variant is reserved exclusively for registerStdTest")
} else if strings.HasSuffix(name, ":racebench") && heading != "Running benchmarks briefly." {
- panic(":racebench variant is reserved exclusively for registerRaceBenchTest")
+ panic("racebench variant is reserved exclusively for registerRaceBenchTest")
}
if t.testNames == nil {
t.testNames = make(map[string]bool)