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

上传者: 42108948 | 上传时间: 2021-02-02 16:35:52 | 文件大小: 106KB | 文件类型: ZIP
作证-您应该编写测试 :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

文件下载

资源详情

[{"title":"( 55 个子文件 106KB ) 证明:具有常见断言和模拟的工具箱,可与标准库很好地配合使用-源码","children":[{"title":"testify-master","children":[{"title":"go.mod <span style='color:#111;'> 216B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"pull_request_template.md <span style='color:#111;'> 366B </span>","children":null,"spread":false}],"spread":true},{"title":"go.sum <span style='color:#111;'> 931B </span>","children":null,"spread":false},{"title":".travis.govet.sh <span style='color:#111;'> 34B </span>","children":null,"spread":false},{"title":"http","children":[{"title":"test_response_writer.go <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"test_round_tripper.go <span style='color:#111;'> 378B </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 62B </span>","children":null,"spread":false}],"spread":true},{"title":"require","children":[{"title":"require_forward.go.tmpl <span style='color:#111;'> 173B </span>","children":null,"spread":false},{"title":"forward_requirements.go <span style='color:#111;'> 428B </span>","children":null,"spread":false},{"title":"require.go.tmpl <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"forward_requirements_test.go <span style='color:#111;'> 11.31KB </span>","children":null,"spread":false},{"title":"requirements.go <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"requirements_test.go <span style='color:#111;'> 13.81KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 876B </span>","children":null,"spread":false},{"title":"require.go <span style='color:#111;'> 56.27KB </span>","children":null,"spread":false},{"title":"require_forward.go <span style='color:#111;'> 51.16KB </span>","children":null,"spread":false}],"spread":true},{"title":"suite","children":[{"title":"suite.go <span style='color:#111;'> 4.84KB </span>","children":null,"spread":false},{"title":"stats_test.go <span style='color:#111;'> 712B </span>","children":null,"spread":false},{"title":"stats.go <span style='color:#111;'> 941B </span>","children":null,"spread":false},{"title":"interfaces.go <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 2.62KB </span>","children":null,"spread":false},{"title":"suite_test.go <span style='color:#111;'> 15.70KB </span>","children":null,"spread":false}],"spread":true},{"title":".travis.gogenerate.sh <span style='color:#111;'> 455B </span>","children":null,"spread":false},{"title":".travis.gofmt.sh <span style='color:#111;'> 278B </span>","children":null,"spread":false},{"title":"assert","children":[{"title":"forward_assertions.go <span style='color:#111;'> 428B </span>","children":null,"spread":false},{"title":"assertion_compare.go <span style='color:#111;'> 10.30KB </span>","children":null,"spread":false},{"title":"assertion_forward.go <span style='color:#111;'> 52.66KB </span>","children":null,"spread":false},{"title":"errors.go <span style='color:#111;'> 326B </span>","children":null,"spread":false},{"title":"assertion_format.go <span style='color:#111;'> 29.69KB </span>","children":null,"spread":false},{"title":"forward_assertions_test.go <span style='color:#111;'> 20.58KB </span>","children":null,"spread":false},{"title":"assertion_compare_test.go <span style='color:#111;'> 14.47KB </span>","children":null,"spread":false},{"title":"assertion_forward.go.tmpl <span style='color:#111;'> 185B </span>","children":null,"spread":false},{"title":"http_assertions_test.go <span style='color:#111;'> 6.02KB </span>","children":null,"spread":false},{"title":"assertion_format.go.tmpl <span style='color:#111;'> 184B </span>","children":null,"spread":false},{"title":"assertion_order_test.go <span style='color:#111;'> 6.95KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"assertion_order.go <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"assertions_test.go <span style='color:#111;'> 59.93KB </span>","children":null,"spread":false},{"title":"http_assertions.go <span style='color:#111;'> 5.42KB </span>","children":null,"spread":false},{"title":"assertions.go <span style='color:#111;'> 49.47KB </span>","children":null,"spread":false}],"spread":false},{"title":"CONTRIBUTING.md <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":".travis.yml <span style='color:#111;'> 419B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 10.65KB </span>","children":null,"spread":false},{"title":"package_test.go <span style='color:#111;'> 186B </span>","children":null,"spread":false},{"title":"mock","children":[{"title":"mock_test.go <span style='color:#111;'> 47.00KB </span>","children":null,"spread":false},{"title":"mock.go <span style='color:#111;'> 28.36KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false}],"spread":false},{"title":"MAINTAINERS.md <span style='color:#111;'> 186B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 263B </span>","children":null,"spread":false},{"title":"_codegen","children":[{"title":"go.mod <span style='color:#111;'> 130B </span>","children":null,"spread":false},{"title":"main.go <span style='color:#111;'> 7.34KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 239B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 9B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明