goconvery基本使用

(1.)项目地址

https://github.com/smartystreets/goconvery

(2.)安装

go get -u github.com/smartystreets/goconvery/convery

(3.)启动UI界面

$GOPATH/bin/goconvery

(4.)使用示例

import(
    "testing"
    . "github.com/smartystreets/goconvery/convery"
)

func TestAdd(t *testing.T) {
    Convery("Params",t,func(){
        a := 2
        b := 4

        Convery("add two number",func(){
            c := a+b

            Convery ("result assert",func(){
                So (c%2,ShouldEqual,0)
            })
        })
    })
}

【励志篇】:
古之成大事掌大学问者,不惟有超世之才,亦必有坚韧不拔之志。