Raising the bar on Phobos unittest coverage

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Fri Jun 21 02:26:02 PDT 2013


On 06/21/2013 09:33 AM, Jacob Carlborg wrote:
> I thought that flag was supposed to make the test fail if the coverage gets
> lower than specified? It would be nice to have the value printed to see if the
> coverage is increased.

-cov=nnn tests aren't (AFAICS) implemented as part of make unittest, nor is
plain -cov.

I think a minimum acceptable threshold is necessary but not sufficient -- say
your minimum code coverage is 85%, it's still most likely unacceptable if your
coverage drops (say) from 92% to 87%.

Anyway, the main benefit I see in printing the percentages isn't for testing
purposes (though it's handy) but in advertising the existence and usefulness of
code coverage analysis, and giving developers a nudge as to where and what to
work on :-)


More information about the Digitalmars-d mailing list