diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-27 22:17:21 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-27 22:41:49 +0000 |
| commit | e25fdb968c4ff93c6d41574f2220a11ee02b0914 (patch) | |
| tree | 1c6cbc1c826ea93488c3d4014998802b871d1ecb /src/testing/quick/quick.go | |
| parent | 33b3cc156886a6184a3ee2036e7748cee9b28eec (diff) | |
| download | go-e25fdb968c4ff93c6d41574f2220a11ee02b0914.tar.xz | |
doc: mention testing/quick RNG seeding change in Go 1.9 notes
Also reword the testing/quick.Config field docs to conform to the
normal subject-first style. Without that style, godoc links
/pkg/testing/quick/#Config.Rand to the wrong line, since it doesn't
recognize the preceding comment as necessarily being attached.
Fixes #20809
Change-Id: I9aebbf763eed9b1ab1a153fa11850d88a65571c6
Reviewed-on: https://go-review.googlesource.com/46910
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/testing/quick/quick.go')
| -rw-r--r-- | src/testing/quick/quick.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/testing/quick/quick.go b/src/testing/quick/quick.go index 94d873988a..0457fc7571 100644 --- a/src/testing/quick/quick.go +++ b/src/testing/quick/quick.go @@ -175,19 +175,20 @@ func sizedValue(t reflect.Type, rand *rand.Rand, size int) (value reflect.Value, // A Config structure contains options for running a test. type Config struct { - // MaxCount sets the maximum number of iterations. If zero, - // MaxCountScale is used. + // MaxCount sets the maximum number of iterations. + // If zero, MaxCountScale is used. MaxCount int - // MaxCountScale is a non-negative scale factor applied to the default - // maximum. If zero, the default is unchanged. + // MaxCountScale is a non-negative scale factor applied to the + // default maximum. + // If zero, the default is unchanged. MaxCountScale float64 - // If non-nil, rand is a source of random numbers. Otherwise a default - // pseudo-random source will be used. + // Rand specifies a source of random numbers. + // If nil, a default pseudo-random source will be used. Rand *rand.Rand - // If non-nil, the Values function generates a slice of arbitrary - // reflect.Values that are congruent with the arguments to the function - // being tested. Otherwise, the top-level Value function is used - // to generate them. + // Values specifies a function to generate a slice of + // arbitrary reflect.Values that are congruent with the + // arguments to the function being tested. + // If nil, the top-level Value function is used to generate them. Values func([]reflect.Value, *rand.Rand) } |
