测试框架goconvey使用

goconvey

示例代码

func Test_Fib_convey(t *testing.T) {
    Convey("Test_Fib_convey should return true when actual=7  && expected = 13", t, func() {
       actual := Fib(7)
       expected := 13
       So(actual, ShouldEqual, expected)
    })
    Convey("Test_Fib_convey should return true when actual=6  && expected = 8", t, func() {
       actual := Fib(6)
       expected := 8
       So(actual, ShouldEqual, expected)
    })
    Convey("Test_Fib_convey should return true when actual=5  && expected = 5", t, func() {
       actual := Fib(5)
       expected := 0
       So(actual, ShouldEqual, expected)
    })
 }

结果图

[外链图片转存中…(img-fuv17gA2-1686296533775)]

[外链图片转存中…(img-vDJdU9QE-1686296533776)]

你可能感兴趣的:(java,html,servlet)