Documented unittests & code coverage

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 28 23:07:52 PDT 2016


On Friday, 29 July 2016 at 05:12:58 UTC, Walter Bright wrote:
> As soon as we start taking the % coverage too seriously, we are 
> in trouble. It's never going to be cut and dried what should be 
> tested and what is unreasonable to test, and I see no point in 
> arguing about it.
>
> The % is a useful indicator, that is all. It is not a 
> substitute for thought.
>
> As always, use good judgement.

In the context of the bug, we are not the ones interpreting the 
statistic, we're the ones measuring and reporting it to users, 
and it's being measured incorrectly. By deciding not to fix a bug 
that causes an inaccurate statistic to be reported, you're making 
a decision on the user's behalf that coverage % is unimportant 
without knowing their circumstances.

If you're going to include coverage % in the report, then a job 
worth doing is worth doing well.


More information about the Digitalmars-d mailing list