🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 语法 ### Func ``` func Check(f interface{}, config *Config) error func CheckEqual(f, g interface{}, config *Config) error func Value(t reflect.Type, rand *rand.Rand) (value reflect.Value, ok bool) ``` ## Type ``` // func ``` ## 实例 ### Check 测试函数是否有效 ``` // func func Add(a,b int)int{ return a+b } // test func TestAdd(t *testing.T){ f := func(a,b int) bool{ res :=Add(a,b) return res==(a+b) } err:=quick.Check(f,nil) if err != nil { t.Error(err) } } ```