Skip to content

Commit

Permalink
Fixed bug in the line number matching.
Browse files Browse the repository at this point in the history
  • Loading branch information
exyi committed Feb 6, 2018
1 parent 6ca4d4c commit 2ff5f26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MiniCover/Reports/HtmlReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ protected override void WriteDetailedReport(InstrumentationResult result, IDicti
var uncoveredLineNumbers = new HashSet<int>();
foreach(var i in kvFile.Value.Instructions)
if (!hits.Contains(i.Id))
for (var lineIndex = i.StartLine; lineIndex < i.EndLine; lineIndex++)
for (var lineIndex = i.StartLine; lineIndex <= i.EndLine; lineIndex++)
uncoveredLineNumbers.Add(lineIndex);

var coveredLineNumbers = new HashSet<int>();
foreach (var i in kvFile.Value.Instructions)
if (hits.Contains(i.Id))
for (var lineIndex = i.StartLine; lineIndex < i.EndLine; lineIndex++)
for (var lineIndex = i.StartLine; lineIndex <= i.EndLine; lineIndex++)
coveredLineNumbers.Add(lineIndex);

var l = 0;
Expand Down

0 comments on commit 2ff5f26

Please sign in to comment.