diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-01 23:21:55 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-02 00:13:47 +0000 |
| commit | 5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch) | |
| tree | 00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/testing | |
| parent | 8b4deb448e587802f67930b765c9598fc8cd36e5 (diff) | |
| download | go-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.xz | |
all: single space after period.
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.
This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:
$ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])')
$ go test go/doc -update
Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dave Day <djd@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/allocs.go | 2 | ||||
| -rw-r--r-- | src/testing/benchmark.go | 6 | ||||
| -rw-r--r-- | src/testing/iotest/reader.go | 2 | ||||
| -rw-r--r-- | src/testing/quick/quick.go | 4 | ||||
| -rw-r--r-- | src/testing/testing.go | 10 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/testing/allocs.go b/src/testing/allocs.go index 80c8658acf..1eeb2d4802 100644 --- a/src/testing/allocs.go +++ b/src/testing/allocs.go @@ -12,7 +12,7 @@ import ( // Although the return value has type float64, it will always be an integral value. // // To compute the number of allocations, the function will first be run once as -// a warm-up. The average number of allocations over the specified number of +// a warm-up. The average number of allocations over the specified number of // runs will then be measured and returned. // // AllocsPerRun sets GOMAXPROCS to 1 during its measurement and will restore diff --git a/src/testing/benchmark.go b/src/testing/benchmark.go index 39b8cff4d3..a5b163201e 100644 --- a/src/testing/benchmark.go +++ b/src/testing/benchmark.go @@ -63,7 +63,7 @@ type B struct { netBytes uint64 } -// StartTimer starts timing a test. This function is called automatically +// StartTimer starts timing a test. This function is called automatically // before a benchmark starts, but it can also used to resume timing after // a call to StopTimer. func (b *B) StartTimer() { @@ -76,7 +76,7 @@ func (b *B) StartTimer() { } } -// StopTimer stops timing a test. This can be used to pause the timer +// StopTimer stops timing a test. This can be used to pause the timer // while performing complex initialization that you don't // want to measure. func (b *B) StopTimer() { @@ -192,7 +192,7 @@ func (b *B) run() BenchmarkResult { return b.result } -// launch launches the benchmark function. It gradually increases the number +// launch launches the benchmark function. It gradually increases the number // of benchmark iterations until the benchmark runs for the requested benchtime. // It prints timing information in this form // testing.BenchmarkHello 100000 19 ns/op diff --git a/src/testing/iotest/reader.go b/src/testing/iotest/reader.go index a5bccca906..8d82018fd6 100644 --- a/src/testing/iotest/reader.go +++ b/src/testing/iotest/reader.go @@ -71,7 +71,7 @@ func (r *dataErrReader) Read(p []byte) (n int, err error) { var ErrTimeout = errors.New("timeout") // TimeoutReader returns ErrTimeout on the second read -// with no data. Subsequent calls to read succeed. +// with no data. Subsequent calls to read succeed. func TimeoutReader(r io.Reader) io.Reader { return &timeoutReader{r, 0} } type timeoutReader struct { diff --git a/src/testing/quick/quick.go b/src/testing/quick/quick.go index 1056aa2488..4bc8e3fc2e 100644 --- a/src/testing/quick/quick.go +++ b/src/testing/quick/quick.go @@ -248,8 +248,8 @@ func (s *CheckEqualError) Error() string { } // Check looks for an input to f, any function that returns bool, -// such that f returns false. It calls f repeatedly, with arbitrary -// values for each argument. If f returns false on a given input, +// such that f returns false. It calls f repeatedly, with arbitrary +// values for each argument. If f returns false on a given input, // Check returns that input as a *CheckError. // For example: // diff --git a/src/testing/testing.go b/src/testing/testing.go index 95182076ef..981883e07a 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -45,7 +45,7 @@ // // The benchmark function must run the target code b.N times. // During benchmark execution, b.N is adjusted until the benchmark function lasts -// long enough to be timed reliably. The output +// long enough to be timed reliably. The output // BenchmarkHello 10000000 282 ns/op // means that the loop ran 10000000 times at a speed of 282 ns per loop. // @@ -160,8 +160,8 @@ import ( var ( // The short flag requests that tests run more quickly, but its functionality - // is provided by test writers themselves. The testing package is just its - // home. The all.bash installation script sets it to make installation more + // is provided by test writers themselves. The testing package is just its + // home. The all.bash installation script sets it to make installation more // efficient, but by default the flag is off so a plain "go test" will do a // full test of the package. short = flag.Bool("test.short", false, "run smaller test suite to save time") @@ -337,9 +337,9 @@ func (c *common) FailNow() { // This previous version duplicated code (those lines are in // tRunner no matter what), but worse the goroutine teardown // implicit in runtime.Goexit was not guaranteed to complete - // before the test exited. If a test deferred an important cleanup + // before the test exited. If a test deferred an important cleanup // function (like removing temporary files), there was no guarantee - // it would run on a test failure. Because we send on c.signal during + // it would run on a test failure. Because we send on c.signal during // a top-of-stack deferred function now, we know that the send // only happens after any other stacked defers have completed. c.finished = true |
