Exemplo n.º 1
0
 public void RenderCoverage (SourceBuffer buf, CodeRecord rec)
 {
     foreach ( var line in rec.GetLines() ){
         var hits = rec.GetHits(line);
         if ( hits > 0 ){
             var hittag = hits == 1 ? "visited_once" : "visited_more";
             buf.ApplyTag (hittag, buf.GetIterAtLine (line - 1), buf.GetIterAtLine (line));
         }
     }
 }
Exemplo n.º 2
0
 public int GetCoverage( CodeRecord rec )
 {
     if ( rec.GetLines().Length == 0 ) return -1;
     return (int)Math.Round( 100*rec.Coverage );
 }