3 ms·
Why do some people use spaces when writing Table Driven Tests with Go? It makes it harder to run go test -run=TestName because you have to convert manually all
by henvic 6y ago
Why do some people use spaces when writing Table Driven Tests with Go? It makes it harder to run go test -run=TestName because you have to convert manually all " " to "_" and back.
This is at least a great reason why this 'test name with spaces' pattern isn't found in the standard library:
https://github.com/golang/go/search?q=t.Run https://github.com/golang/go/search?q=t.Run
- insertnickname 6y agoI_don't_know_why_we_even_have_spaces._Somebody_tell_me!
- henvic 6y agoOh, so what about having spaces in your function names too, if you like spaces this much?