用delve调试测试

用delve调试测试,第1张

用delve调试测试

用途

dlvtest

$ dlv test -- -test.vType 'help' for list of commands.(dlv) continue=== RUN   TestReadFileError--- PASS: TestReadFileError (0.00s)=== RUN   TestReadFile--- PASS: TestReadFile (0.00s)[..]PASSProcess 8014 has exited with status 0(dlv) quitProcess 8014 has exited with status 0

您还可以通过

-test.run
选择要运行的测试(就像
go test -run
)。

在内部,这与Flimzy的答案相同(它使用编译测试二进制文件

go test -c
),但更加精简,不会留下.test文件供您清理。



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5639052.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存