40 ms·
I'm definitely guilty of not unit testing my error paths robustly. Line-by-line code coverage reports showed pretty consistent gaps, especially when operations
by favorited 8y ago
I'm definitely guilty of not unit testing my error paths robustly. Line-by-line code coverage reports showed pretty consistent gaps, especially when operations become no-ops by returning early in case of certain errors.
Kind of surprising that other kinds of testing didn't reveal that bad log line, since it will always KP...
- candiodari 8y agoUnit tests are just example-based tests. They cannot test the code does nothing wrong in any case, they just test that in 1 specific case, it works. Only proof-based methods can prove code works under every case. If you're interested, see Coq [1] (including the first guaranteed-correct C compiler) or Isabelle. [1] https://en.wikipedia.org/wiki/Coq https://en.wikipedia.org/wiki/Coq