Skip to content

Commit

Permalink
fixed and error in visited attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosrodcam committed Feb 25, 2018
1 parent 29b6814 commit b6ac6a2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/MiniCover/Reports/OpenCoverReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,11 @@ public static void Execute(InstrumentationResult result, string output, float th
);

int sequencePointMiniCounter = 0;
bool allLinesAreVisited = true;

var sequencePoints = method.Select(methodPoint =>
{
var hitCount = hitInstructions.Count(hit => hit.Equals(methodPoint));

if (hitCount == 0)
allLinesAreVisited = false;

return new XElement(
XName.Get("SequencePoint"),
new XAttribute(XName.Get("vc"), hitCount),
Expand All @@ -111,7 +107,7 @@ public static void Execute(InstrumentationResult result, string output, float th

var methodElement = new XElement(
XName.Get("Method"),
new XAttribute(XName.Get("visited"), allLinesAreVisited),
new XAttribute(XName.Get("visited"), method.Any(p => hitInstructions.Any(hit => hit == p))),
new XAttribute(XName.Get("isConstructor"), method.Key.Method == ".ctor")
);

Expand Down

0 comments on commit b6ac6a2

Please sign in to comment.