diff options
| author | cui fliter <imcusg@gmail.com> | 2023-11-04 15:44:55 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-11-08 17:55:47 +0000 |
| commit | 0889b39ff12405c37ce23af5b65263ab4b31899c (patch) | |
| tree | e696f64eb3e0774efce43534626e20ba536a4df1 /src/testing/quick | |
| parent | 5cb0839ee08b765e343ce291f334e5c80b68337d (diff) | |
| download | go-0889b39ff12405c37ce23af5b65263ab4b31899c.tar.xz | |
testing: add available godoc link
Change-Id: I8f4d097601796f53176d490cddf8832b7caa4c05
Reviewed-on: https://go-review.googlesource.com/c/go/+/539836
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/quick')
| -rw-r--r-- | src/testing/quick/quick.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testing/quick/quick.go b/src/testing/quick/quick.go index d7117420a3..8ef9cf7dda 100644 --- a/src/testing/quick/quick.go +++ b/src/testing/quick/quick.go @@ -54,7 +54,7 @@ func randInt64(rand *rand.Rand) int64 { const complexSize = 50 // Value returns an arbitrary value of the given type. -// If the type implements the Generator interface, that will be used. +// If the type implements the [Generator] interface, that will be used. // 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) { return sizedValue(t, rand, complexSize) @@ -234,7 +234,7 @@ func (s *CheckError) Error() string { return fmt.Sprintf("#%d: failed on input %s", s.Count, toString(s.In)) } -// A CheckEqualError is the result CheckEqual finding an error. +// A CheckEqualError is the result [CheckEqual] finding an error. type CheckEqualError struct { CheckError Out1 []any @@ -248,7 +248,7 @@ 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, -// Check returns that input as a *CheckError. +// Check returns that input as a *[CheckError]. // For example: // // func TestOddMultipleOfThree(t *testing.T) { @@ -297,7 +297,7 @@ func Check(f any, config *Config) error { // CheckEqual looks for an input on which f and g return different results. // It calls f and g repeatedly with arbitrary values for each argument. -// If f and g return different answers, CheckEqual returns a *CheckEqualError +// If f and g return different answers, CheckEqual returns a *[CheckEqualError] // describing the input and the outputs. func CheckEqual(f, g any, config *Config) error { if config == nil { |
