0
Committing...
Visited Classes 0 of 18 (0)
Visited Methods 0 of 68 (0)
Visited Points 0 of 133 (0)
Visited Branches 0 of 74 (0)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 0 of 19 (0)
Alternative Visited Methods 0 of 92 (0)

I'm curious.

Visited Methods is 68 but Alternative Visited Methods got 92.

What is the meaning of Alternative Visited Methods?

What does mean it includes more?

Is there an example of a code that is included in the alternative visiting method, although it is excluded from the visited method?


Edit :

An 'auto-generated function' that is not defined by the user is included in the parameter of Alternative Visited Methods and is not included in Visited Methods.

public class ActionClass
{
}

output

Visited Methods 0 of 0
Alternative Visited Methods 0 of 1

public class ActionClass
{
    public ActionClass() { }
 
    public void A()
    {
    }
}

output

Visited Methods 0 of 2
Alternative Visited Methods 0 of 2

The reason why we see the event as two in this result this seems to be because the event includes add and remove functions. https://learn.microsoft.com/ko-kr/dotnet/csharp/language-reference/keywords/add

public class ActionClass
{
    public delegate void Notifier();
    public event Notifier Handler;
 
    public ActionClass()
    {
    }
}

output

Visited Methods 0 of 1
Alternative Visited Methods 0 of 3
KH P
  • 1
  • 1
  • You could read the source code https://github.com/OpenCover/opencover/blob/06dbc2683dfd53f65f8241f9ef619ca60a2321ef/main/OpenCover.Console/Program.cs#L382 but that tool doesn't seem to be maintained anymore. – Jeremy Lakeman Apr 08 '22 at 01:50
  • @JeremyLakeman Thanks to your reference, I got to know the difference between the two. – KH P Apr 15 '22 at 05:54

0 Answers0