使用两个包
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
github:https://github.com/onsi/ginkgo
文章:
http://onsi.github.io/ginkgo/#measuring-time
使用duck typing方式多
创建接口,放入不同的构造中,然后另建结构实现,返回自己想要的值,可以解决某些方法前置调用
go语言测试代码
猜你喜欢
转载自hhg08.iteye.com/blog/2283946
今日推荐
周排行