dream_life5200
2018-01-26 16:05
浏览 797
已采纳

如何使用go test -run运行特定的golang测试

What am I doing wrong here? I just want to run this one ConnectionPoolTest.TestNew and what ever I try, I get back 'no test to run'

:go test  --check.list *.go |grep Connectio
ConnectionPoolTest.TestNew
:go test  --run ConnectionPoolTest *.go
ok      command-line-arguments  0.005s [no tests to run]
:go test  --run ConnectionPoolTest.TestNew *.go
ok      command-line-arguments  0.005s [no tests to run]

图片转代码服务由CSDN问答提供 功能建议

我在这里做错了什么? 我只想运行一个ConnectionPoolTest.TestNew,然后尝试执行任何操作,然后返回“无测试运行” </ p>

 :go test --check.list * .go  | grep Connectio 
ConnectionPoolTest.TestNew 
:go测试--run ConnectionPoolTest * .go 
ok命令行参数0.005s [无要运行的测试] 
:go test --run ConnectionPoolTest.TestNew * .go 
ok 命令行参数0.005s [无测试可运行] 
 </ code> </ pre> 
 </ div>

1条回答 默认 最新

相关推荐 更多相似问题