What's the difference between alternative visited and just visited in the opencover?

53 views Asked by At
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
0

There are 0 answers