LGTM but remove the extra Otherwise, Otherwise. Otherwise, it's good. On Fri, Feb 10, 2012 ...
13 years, 3 months ago
(2012-02-10 03:35:57 UTC)
#2
LGTM but remove the extra Otherwise, Otherwise. Otherwise, it's good.
On Fri, Feb 10, 2012 at 2:29 PM, <r@golang.org> wrote:
> Reviewers: golang-dev_googlegroups.com,
>
> Message:
> Hello golang-dev@googlegroups.com,
>
> I'd like you to review this change to
> https://go.googlecode.com/hg/
>
>
> Description:
> testing/quick: documentation tweaks
>
> Fixes issue 2960.
>
> Please review this at
http://codereview.appspot.com/**5652055/<http://codereview.appspot.com/5652055/>
>
> Affected files:
> M src/pkg/testing/quick/quick.go
>
>
> Index: src/pkg/testing/quick/quick.go
> ==============================**==============================**=======
> --- a/src/pkg/testing/quick/quick.**go
> +++ b/src/pkg/testing/quick/quick.**go
> @@ -50,7 +50,7 @@
>
> // Value returns an arbitrary value of the given type.
> // If the type implements the Generator interface, that will be used.
> -// Note: in order to create arbitrary values for structs, all the members
> must be public.
> +// Note: To create arbitrary values for structs, all the fields must be
> exported.
> func Value(t reflect.Type, rand *rand.Rand) (value reflect.Value, ok
> bool) {
> if m, ok := reflect.Zero(t).Interface().(**Generator); ok {
> return m.Generate(rand, complexSize), true
> @@ -155,9 +155,10 @@
> // If non-nil, rand is a source of random numbers. Otherwise a
> default
> // pseudo-random source will be used.
> Rand *rand.Rand
> - // If non-nil, Values is a function which generates a slice of
> arbitrary
> - // Values that are congruent with the arguments to the function
> being
> - // tested. Otherwise, Values is used to generate the values.
> + // 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, otherwise, the top-level Values
> function is used
> + // to generate them.
> Values func([]reflect.Value, *rand.Rand)
> }
>
>
>
>
Issue 5652055: code review 5652055: testing/quick: documentation tweaks
(Closed)
Created 13 years, 3 months ago by r
Modified 13 years, 3 months ago
Reviewers:
Base URL:
Comments: 0