]> Cypherpunks repositories - gostls13.git/commitdiff
testing/quick: brought Check parameter name in line with function doc
authorCaleb Spare <cespare@gmail.com>
Thu, 19 Jun 2014 05:49:14 +0000 (01:49 -0400)
committerShenghou Ma <minux@golang.org>
Thu, 19 Jun 2014 05:49:14 +0000 (01:49 -0400)
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/102830043

src/pkg/testing/quick/quick.go

index bc79cc32922b618cf351dd34cab52c2e1d8287d9..909c65f788b78f5b197b57bfc1b952f9abf4b09d 100644 (file)
@@ -225,12 +225,12 @@ func (s *CheckEqualError) Error() string {
 //                     t.Error(err)
 //             }
 //     }
-func Check(function interface{}, config *Config) (err error) {
+func Check(f interface{}, config *Config) (err error) {
        if config == nil {
                config = &defaultConfig
        }
 
-       f, fType, ok := functionAndType(function)
+       fVal, fType, ok := functionAndType(f)
        if !ok {
                err = SetupError("argument is not a function")
                return
@@ -255,7 +255,7 @@ func Check(function interface{}, config *Config) (err error) {
                        return
                }
 
-               if !f.Call(arguments)[0].Bool() {
+               if !fVal.Call(arguments)[0].Bool() {
                        err = &CheckError{i + 1, toInterfaces(arguments)}
                        return
                }