]> Cypherpunks.ru repositories - gostls13.git/commitdiff
testing: use conventional comments for exported internal funcs & structs
authorvovapi <evgrafov.vladimir@gmail.com>
Tue, 10 Dec 2019 10:34:34 +0000 (10:34 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 10 Dec 2019 21:11:20 +0000 (21:11 +0000)
Change-Id: I2dd5ddc22bfff143b81d5945992d8c5fccf387f4
GitHub-Last-Rev: aa637756e772f5ee9094b802df3be9945c8466c4
GitHub-Pull-Request: golang/go#36054
Reviewed-on: https://go-review.googlesource.com/c/go/+/210497
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/testing/benchmark.go
src/testing/example.go
src/testing/testing.go

index e954fc6ccbbac849d347b1d9458288d01a21fc15..04127727c1112df55657a6eb4c31e78e2c68ce93 100644 (file)
@@ -69,8 +69,8 @@ var benchmarkLock sync.Mutex
 // Used for every benchmark for measuring memory.
 var memStats runtime.MemStats
 
-// An internal type but exported because it is cross-package; part of the implementation
-// of the "go test" command.
+// InternalBenchmark is an internal type but exported because it is cross-package;
+// it is part of the implementation of the "go test" command.
 type InternalBenchmark struct {
        Name string
        F    func(b *B)
@@ -342,7 +342,7 @@ func (b *B) ReportMetric(n float64, unit string) {
        b.extra[unit] = n
 }
 
-// The results of a benchmark run.
+// BenchmarkResult contains the results of a benchmark run.
 type BenchmarkResult struct {
        N         int           // The number of iterations.
        T         time.Duration // The total time taken.
@@ -488,8 +488,8 @@ type benchContext struct {
        extLen int // Maximum extension length.
 }
 
-// An internal function but exported because it is cross-package; part of the implementation
-// of the "go test" command.
+// RunBenchmarks is an internal function but exported because it is cross-package;
+// it is part of the implementation of the "go test" command.
 func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark) {
        runBenchmarks("", matchString, benchmarks)
 }
index c122121289d3799982f349c123ba42a61aa5f9f1..adc91d5faf66488f3e3f451cc213df9c1c1f150f 100644 (file)
@@ -19,8 +19,8 @@ type InternalExample struct {
        Unordered bool
 }
 
-// An internal function but exported because it is cross-package; part of the implementation
-// of the "go test" command.
+// RunExamples is an internal function but exported because it is cross-package;
+// it is part of the implementation of the "go test" command.
 func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool) {
        _, ok = runExamples(matchString, examples)
        return ok
index 5f13e60f4f621b04dd571e949b738c07aa847714..15ff1dd81d0c89664c95dd58b90ff5dbe0d14a3e 100644 (file)
@@ -863,8 +863,8 @@ func (t *T) Parallel() {
        t.raceErrors += -race.Errors()
 }
 
-// An internal type but exported because it is cross-package; part of the implementation
-// of the "go test" command.
+// InternalTest is an internal type but exported because it is cross-package;
+// it is part of the implementation of the "go test" command.
 type InternalTest struct {
        Name string
        F    func(*T)
@@ -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
-// of the "go test" command.
+// RunTests is an internal function but exported because it is cross-package;
+// it is part of the implementation of the "go test" command.
 func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool) {
        ran, ok := runTests(matchString, tests)
        if !ran && !haveExamples {