Skip to content

Commit 207a0b7

Browse files
vovapibradfitz
authored andcommitted
testing: use conventional comments for exported internal funcs & structs
Change-Id: I2dd5ddc22bfff143b81d5945992d8c5fccf387f4 GitHub-Last-Rev: aa63775 GitHub-Pull-Request: #36054 Reviewed-on: https://go-review.googlesource.com/c/go/+/210497 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 5e35845 commit 207a0b7

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/testing/benchmark.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ var benchmarkLock sync.Mutex
6969
// Used for every benchmark for measuring memory.
7070
var memStats runtime.MemStats
7171

72-
// An internal type but exported because it is cross-package; part of the implementation
73-
// of the "go test" command.
72+
// InternalBenchmark is an internal type but exported because it is cross-package;
73+
// it is part of the implementation of the "go test" command.
7474
type InternalBenchmark struct {
7575
Name string
7676
F func(b *B)
@@ -342,7 +342,7 @@ func (b *B) ReportMetric(n float64, unit string) {
342342
b.extra[unit] = n
343343
}
344344

345-
// The results of a benchmark run.
345+
// BenchmarkResult contains the results of a benchmark run.
346346
type BenchmarkResult struct {
347347
N int // The number of iterations.
348348
T time.Duration // The total time taken.
@@ -488,8 +488,8 @@ type benchContext struct {
488488
extLen int // Maximum extension length.
489489
}
490490

491-
// An internal function but exported because it is cross-package; part of the implementation
492-
// of the "go test" command.
491+
// RunBenchmarks is an internal function but exported because it is cross-package;
492+
// it is part of the implementation of the "go test" command.
493493
func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark) {
494494
runBenchmarks("", matchString, benchmarks)
495495
}

src/testing/example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ type InternalExample struct {
1919
Unordered bool
2020
}
2121

22-
// An internal function but exported because it is cross-package; part of the implementation
23-
// of the "go test" command.
22+
// RunExamples is an internal function but exported because it is cross-package;
23+
// it is part of the implementation of the "go test" command.
2424
func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool) {
2525
_, ok = runExamples(matchString, examples)
2626
return ok

src/testing/testing.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,8 @@ func (t *T) Parallel() {
863863
t.raceErrors += -race.Errors()
864864
}
865865

866-
// An internal type but exported because it is cross-package; part of the implementation
867-
// of the "go test" command.
866+
// InternalTest is an internal type but exported because it is cross-package;
867+
// it is part of the implementation of the "go test" command.
868868
type InternalTest struct {
869869
Name string
870870
F func(*T)
@@ -1214,8 +1214,8 @@ func listTests(matchString func(pat, str string) (bool, error), tests []Internal
12141214
}
12151215
}
12161216

1217-
// An internal function but exported because it is cross-package; part of the implementation
1218-
// of the "go test" command.
1217+
// RunTests is an internal function but exported because it is cross-package;
1218+
// it is part of the implementation of the "go test" command.
12191219
func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool) {
12201220
ran, ok := runTests(matchString, tests)
12211221
if !ran && !haveExamples {

0 commit comments

Comments
 (0)