Hacker News new | past | comments | ask | show | jobs | submit login

> In Go you have to do this or your line/branch coverage will be abysmal.

If you're writing tests to improve coverage numbers then maybe you're motivation is wrong.

In most languages with automatic exception propagation you never know what exceptions can be thrown. Is it any different from not testing?




It would be interesting to know what errors we might get, but unit testing an error return branch doesn't tell us that. It tells us that any non-nil error will be returned.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: