douan5151 2017-03-22 00:33
浏览 31
已采纳

如何避免Go中重复测试?

Since Go does not allow to debug tests in some IDEs (see also this issue) I had to write my tests twice in my queue implementation.

One time inside main.go, second time - inside queue_test.go

I use Visual Studio Code with delve.

What is the best IDE or pattern to debug Go tests without duplicating them ?

  • 写回答

1条回答 默认 最新

  • dsjlqkbpn029473708 2017-03-22 06:56
    关注

    I think your IDE is unable to debug tests.

    Try something different. For example, as of today, the early access edition of Gogland works quite well with regards to debugging, even with tests. It uses the Delve debugger under the hood, so you can even resort to run the debugger manually from terminal or check to see if it is already integrated with your IDE of choice.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程