Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

100% Test Coverage means that every code path is executed by the test suite. This is probably a good thing.

Yet it does not mean that the code is correct for any definition of "correct" other than "passes the associated test suite." One unit test makes a line of code covered. It does not make the domain of inputs covered - 100% coverage does not mean that corner cases have been handled correctly - or that they have been considered at all. Again, all it means is that every line of code was executed at least once.

There are useless tests:

     def test167  [
       if [ val == foo(8); return true]
         then return passed
         else return failed
       endif ]
     enddef


This of course is true. But some test coverage tools with give you path coverage which helps with that.

Of course, this doesn't really substitute for a type system either.




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

Search: