Commit 207a0b79 authored by vovapi's avatar vovapi Committed by Brad Fitzpatrick

testing: use conventional comments for exported internal funcs & structs

Change-Id: I2dd5ddc22bfff143b81d5945992d8c5fccf387f4
GitHub-Last-Rev: aa637756e772f5ee9094b802df3be9945c8466c4
GitHub-Pull-Request: golang/go#36054
Reviewed-on: https://go-review.googlesource.com/c/go/+/210497Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 5e35845a
...@@ -69,8 +69,8 @@ var benchmarkLock sync.Mutex ...@@ -69,8 +69,8 @@ var benchmarkLock sync.Mutex
// Used for every benchmark for measuring memory. // Used for every benchmark for measuring memory.
var memStats runtime.MemStats var memStats runtime.MemStats
// An internal type but exported because it is cross-package; part of the implementation // InternalBenchmark is an internal type but exported because it is cross-package;
// of the "go test" command. // it is part of the implementation of the "go test" command.
type InternalBenchmark struct { type InternalBenchmark struct {
Name string Name string
F func(b *B) F func(b *B)
...@@ -342,7 +342,7 @@ func (b *B) ReportMetric(n float64, unit string) { ...@@ -342,7 +342,7 @@ func (b *B) ReportMetric(n float64, unit string) {
b.extra[unit] = n b.extra[unit] = n
} }
// The results of a benchmark run. // BenchmarkResult contains the results of a benchmark run.
type BenchmarkResult struct { type BenchmarkResult struct {
N int // The number of iterations. N int // The number of iterations.
T time.Duration // The total time taken. T time.Duration // The total time taken.
...@@ -488,8 +488,8 @@ type benchContext struct { ...@@ -488,8 +488,8 @@ type benchContext struct {
extLen int // Maximum extension length. extLen int // Maximum extension length.
} }
// An internal function but exported because it is cross-package; part of the implementation // RunBenchmarks is an internal function but exported because it is cross-package;
// of the "go test" command. // it is part of the implementation of the "go test" command.
func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark) { func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark) {
runBenchmarks("", matchString, benchmarks) runBenchmarks("", matchString, benchmarks)
} }
......
...@@ -19,8 +19,8 @@ type InternalExample struct { ...@@ -19,8 +19,8 @@ type InternalExample struct {
Unordered bool Unordered bool
} }
// An internal function but exported because it is cross-package; part of the implementation // RunExamples is an internal function but exported because it is cross-package;
// of the "go test" command. // it is part of the implementation of the "go test" command.
func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool) { func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool) {
_, ok = runExamples(matchString, examples) _, ok = runExamples(matchString, examples)
return ok return ok
......
...@@ -863,8 +863,8 @@ func (t *T) Parallel() { ...@@ -863,8 +863,8 @@ func (t *T) Parallel() {
t.raceErrors += -race.Errors() t.raceErrors += -race.Errors()
} }
// An internal type but exported because it is cross-package; part of the implementation // InternalTest is an internal type but exported because it is cross-package;
// of the "go test" command. // it is part of the implementation of the "go test" command.
type InternalTest struct { type InternalTest struct {
Name string Name string
F func(*T) F func(*T)
...@@ -1214,8 +1214,8 @@ func listTests(matchString func(pat, str string) (bool, error), tests []Internal ...@@ -1214,8 +1214,8 @@ func listTests(matchString func(pat, str string) (bool, error), tests []Internal
} }
} }
// An internal function but exported because it is cross-package; part of the implementation // RunTests is an internal function but exported because it is cross-package;
// of the "go test" command. // it is part of the implementation of the "go test" command.
func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool) { func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool) {
ran, ok := runTests(matchString, tests) ran, ok := runTests(matchString, tests)
if !ran && !haveExamples { if !ran && !haveExamples {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment