Add coverage highlighting to IDE

Flamaros flamaros.xavier at gmail.com
Sun Mar 31 16:44:02 PDT 2013


On Wednesday, 27 March 2013 at 12:08:00 UTC, alex wrote:
> On Saturday, 23 March 2013 at 23:14:59 UTC, Walter Bright wrote:
>> Just an idea for an IDE.
>>
>> At the push of a button, run the unittests with -cov on the 
>> module being editted, read the coverage listing file, and then 
>> highlight the code lines that were never executed.
>
> How to run only one module('s unittests)? With rdmd? Or just 
> via dmd with a specific flag set?

I think you have to take a look at :
http://dlang.org/code_coverage.html

It seems you just have to call dmd with the module name and -cov 
option as parameter.

I used eclemma plugin for coverage highlighting on Eclipse, and a 
usefull feature is the capability to use layered result which 
allow you to increase the cover by using many configurations.

Unit tests with highlighting decrease a little the need of 
debuggers, because using asserts or conditions aren't harder to 
use break points.


Maybe it will be necessary to add names on tests.


More information about the Digitalmars-d-ide mailing list