测试
使用testing测试
testing测试使用案例
cal
├── cal.go
├── cal_test.go
└── sub_test.gopackage cal
func Plus(a, b int) int {
return a + b
}
func Sub(a, b int) int {
return a - b
}
func Multi(a, b int) int {
return a * b
}
func Division(a, b int) int {
return a / b
}只打印测试失败结果
针对某个测试文件测试
针对某个测试函数测试
使用注意事项
testing的原理
testing的原理goconvey
使用案例
断言函数索引
使用go test原生命令测试
使用goconvey提供的工具测试



全自动编译测试

测试失败的展示

半自动化书写测试用例

最后更新于