证明:具有常见断言和模拟的工具箱,可与标准库很好地配合使用

时间:2021-02-02 15:41:00
【文件属性】:
文件名称:证明:具有常见断言和模拟的工具箱,可与标准库很好地配合使用
文件大小:106KB
文件格式:ZIP
更新时间:2021-02-02 15:41:00
testing go golang toolkit assertions 作证-您应该编写测试 :information_selector: 我们正在努力作证v2,很想听听您想在其中进行的介绍,请在这里发表您的意见: : Go code(golang)软件包集,提供了许多工具来证明您的代码将按预期运行。 功能包括: 开始使用: 用安装testify,或 有关在Go中编写测试代码的介绍,请参见 查阅API文档 为了测试工作,请查看我们的其他项目 关于 包 assert包提供了一些有用的方法,使您可以在Go中编写更好的测试代码。 打印友好,易于阅读的故障描述 允许非常可读的代码 (可选)用消息注释每个断言 实际观看: package yours import ( "testing" "github.com/stretchr/testify/assert" ) func TestSomething ( t * testing. T ) { // assert equality assert . Equal ( t , 123 , 123 , "they should be equal" ) // assert inequal
【文件预览】:
testify-master
----go.mod(216B)
----.github()
--------pull_request_template.md(366B)
----go.sum(931B)
----.travis.govet.sh(34B)
----http()
--------test_response_writer.go(1KB)
--------test_round_tripper.go(378B)
--------doc.go(62B)
----require()
--------require_forward.go.tmpl(173B)
--------forward_requirements.go(428B)
--------require.go.tmpl(187B)
--------forward_requirements_test.go(11KB)
--------requirements.go(1KB)
--------requirements_test.go(14KB)
--------doc.go(876B)
--------require.go(56KB)
--------require_forward.go(51KB)
----suite()
--------suite.go(5KB)
--------stats_test.go(712B)
--------stats.go(941B)
--------interfaces.go(1KB)
--------doc.go(3KB)
--------suite_test.go(16KB)
----.travis.gogenerate.sh(455B)
----.travis.gofmt.sh(278B)
----assert()
--------forward_assertions.go(428B)
--------assertion_compare.go(10KB)
--------assertion_forward.go(53KB)
--------errors.go(326B)
--------assertion_format.go(30KB)
--------forward_assertions_test.go(21KB)
--------assertion_compare_test.go(14KB)
--------assertion_forward.go.tmpl(185B)
--------http_assertions_test.go(6KB)
--------assertion_format.go.tmpl(184B)
--------assertion_order_test.go(7KB)
--------doc.go(1KB)
--------assertion_order.go(3KB)
--------assertions_test.go(60KB)
--------http_assertions.go(5KB)
--------assertions.go(49KB)
----CONTRIBUTING.md(3KB)
----.travis.yml(419B)
----LICENSE(1KB)
----doc.go(1KB)
----README.md(11KB)
----package_test.go(186B)
----mock()
--------mock_test.go(47KB)
--------mock.go(28KB)
--------doc.go(2KB)
----MAINTAINERS.md(186B)
----.gitignore(263B)
----_codegen()
--------go.mod(130B)
--------main.go(7KB)
--------go.sum(239B)
--------.gitignore(9B)

网友评论