3 ms·
> The question (well, one question) is why would we suspect the lack of a test indicates a bug? It's not the lack of a test, but the fact that the existing tes
by dale_glass 4y ago
> The question (well, one question) is why would we suspect the lack of a test indicates a bug?
It's not the lack of a test, but the fact that the existing test doesn't cover a branch.
Rarely taken paths is exactly where bugs often hide, because they likely weren't well exercised in human-driven testing either, and because they're hit rarely in general so most users don't run into them often. If the condition is not easily reproducible it can be very hard to figure out what to even put in a bug report.
Say you're working with images and have a branch for a 16 bit color (565) image. Such images are rarely used today, but they still exist. Among many users of your code it's possible only 1% ever hit that branch -- and those end up experiencing weird issues nobody else sees.
Or another example of such things is error handling. An application that works perfectly fine on a LAN can be hell to use on a flaky connection.