diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 16:38:43 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 16:38:43 +0000 |
commit | 2d2d80b8bd963f59534897b3d51ef8bd546cb4bc (patch) | |
tree | efa0c55763b34cbc633bc494c2743d1b5d9aaff3 /libgo/go/testing/quick/quick.go | |
parent | 2ad2700dbf70b2e49575f3f2307839a45cf2f71c (diff) | |
download | gcc-2d2d80b8bd963f59534897b3d51ef8bd546cb4bc.tar.gz |
libgo: Update to weekly.2012-02-14 release.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184798 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/testing/quick/quick.go')
-rw-r--r-- | libgo/go/testing/quick/quick.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libgo/go/testing/quick/quick.go b/libgo/go/testing/quick/quick.go index f94c541f2ba..24270982281 100644 --- a/libgo/go/testing/quick/quick.go +++ b/libgo/go/testing/quick/quick.go @@ -50,7 +50,7 @@ const complexSize = 50 // 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 @@ type Config struct { // 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, the top-level Values function is used + // to generate them. Values func([]reflect.Value, *rand.Rand) } |