Allow specifying lines with no expected coverage
Code coverage tool for Delphi
Status: Beta
Brought to you by:
ekot
Originally created by: zar...@gmail.com
There can be lines in the code who will never be covered, because of spurious compiler code generation or other special code situations.
One possible solution would be to detect special comments on a line, and when encountered, not report the line as not covered.
For instance in:
procedure MyProc;
begin
ThisProcedureAlwaysTriggersAnException;
end; {expected coverage issue}
the compiler will generate code for the 'end;', which can never be reached.
Other than spurious codegens, such cases can happen in other optimization scenarios where the compiler doesn't keep up.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Phil.Pr...@gmail.com
It may be useful to have no coverage for many lines, you may have debugging-only code that won’t be executed during your unit tests.
Compilation directives like {$DEFINE DCD_OFF} and {$DEFINE DCD_ON} may be used to identifie the begin and the end of the not to cover code.
for instance :
procedure MyProc;
begin
{$DEFINE DCD_OFF} //next lines will not be "Code Covered"
if bDebug = True then
begin
...
...
end;
{$DEFINE DCD_OFF} //next lines will be "Code Covered"
...
...
end;
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: linards....@gmail.com
I would rather to have poosibility to have ignore list on codu blocks / structures. It would be much more bigger and a lot more useful feature as it would allow to have indepth unhandled crash testing for unexpected situations and aggresive stability tests.