Has someone encountered similar issues with -cov?

Chris via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 2 04:32:41 PDT 2016


On Friday, 1 July 2016 at 20:06:39 UTC, Andrei Alexandrescu wrote:

> What is the condition? -- Andrei

`while`'s job is it to test for a condition and loop while the 
condition is true, even if the condition is `true` or `0`. So 
-cov does the right thing. It checks whether this part of the 
loop (`while xyz is the case`) is executed. In your case it isn't 
which is _your_ problem and not -cov's. It actually shows that 
your code might not be optimal, if you have something in it that 
is never executed and can never be covered. A dead statement.


More information about the Digitalmars-d mailing list