Go语言单元测试testing框架1. 测试基础func TestAdd(t *testing.T) { if Add(1, 2) ! 3 { t.Error(Add failed) } }2. 总结单元测试是保证代码质量的基础Go语言内置testing框架。