convey:在Go中编写行为测试

时间:2024-05-29 07:42:21
【文件属性】:

文件名称:convey:在Go中编写行为测试

文件大小:34KB

文件格式:ZIP

更新时间:2024-05-29 07:42:21

Go

Convey很棒的Go测试 安装 $ go get github.com/wallclockbuilder/convey [快速开始] 进行测试,例如: func TestSpec ( t * testing. T ) { // Only pass t into top-level Convey calls Convey ( "Given some integer with a starting value" , t , func () { x := 1 Convey ( "When the integer is incremented" , func () { x ++ Convey ( "The value should be greater by one" , func () { So ( x , ShouldEqual , 2 ) })


【文件预览】:
convey-master
----isolated_execution_test.go(13KB)
----nilReporter.go(636B)
----init.go(2KB)
----context.go(7KB)
----reporting_hooks_test.go(7KB)
----convey.goconvey(170B)
----discovery.go(2KB)
----examples()
--------examples.goconvey(438B)
--------assertion_examples_test.go(4KB)
--------doc.go(310B)
--------bowling_game_test.go(2KB)
--------bowling_game.go(2KB)
--------simple_example_test.go(696B)
----.travis.yml(118B)
----reporting()
--------reporter.go(1KB)
--------gotest_test.go(2KB)
--------console.go(210B)
--------printer_test.go(4KB)
--------dot.go(808B)
--------init.go(2KB)
--------problems.go(2KB)
--------statistics.go(2KB)
--------reporter_test.go(2KB)
--------story.go(2KB)
--------doc.go(256B)
--------json.go(2KB)
--------reporting.goconvey(20B)
--------printer.go(1KB)
--------reports.go(4KB)
--------gotest.go(674B)
--------problems_test.go(1KB)
--------dot_test.go(890B)
----doc.go(8KB)
----LICENSE.md(1KB)
----README.md(863B)
----story_conventions_test.go(4KB)
----focused_execution_test.go(1KB)
----assertions.go(3KB)
----.gitignore(41B)
----gotest()
--------utils.go(1KB)
--------doc_test.go(15B)

网友评论