如何避免 Go 中的重复测试?
How to avoid duplicate tests in 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.
里面一次main.go, second time - inside queue_test.go
我使用 Visual Studio 代码和 delve。
什么是最好的 IDE 或模式来调试 Go 测试而不复制它们?
我认为你的 IDE 无法调试测试。
尝试不同的东西。例如,从今天开始,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 的抢先体验版由您选择 IDE。
既然去does not allow to debug tests in some IDEs (see also this issue) I had to write my tests twice in my queue implementation.
里面一次main.go, second time - inside queue_test.go
我使用 Visual Studio 代码和 delve。
什么是最好的 IDE 或模式来调试 Go 测试而不复制它们?
我认为你的 IDE 无法调试测试。
尝试不同的东西。例如,从今天开始,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 的抢先体验版由您选择 IDE。