std.rational -- update and progress towards review

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Fri Oct 4 16:12:27 PDT 2013


On 04/10/13 23:40, Walter Bright wrote:
> Methinks you can get the 100% gold!

I don't think any code containing an assert(0) should be able to get 100%, 
unless it's broken and that assert is actually getting triggered, no?  Well, 
unless you want to revise the coverage analyser to ignore assert(0) and 
assert(false) statements. ;-)

The interesting thing is the lines I highlighted, how those enforce statements 
broken across 2 lines actually come out as one covered line and one not:

     enforce(someCondition,   // gets evaluated/covered
             "This message never gets used so the line is not covered.");

But there is the one single return statement that never gets used.  I'll have to 
work out exactly what triggers it and make sure there's a unittest for that.


More information about the Digitalmars-d mailing list