You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys!
After updating to .NET 7 new coverage issue was found.
It can be reproduced easily, you just need to reuse the same method group delegate.
Code:
namespace ClassLibrary1;
public class Class1
{
public int[] Query1()
{
return new[] { 1, 2, 3 }.Select(Map).ToArray();
}
public int[] Query2()
{
return new[] { 1, 2, 3 }.Select(Map).ToArray();
}
private static int Map(int row) => row + 1;
}
Test:
using ClassLibrary1;
using NUnit.Framework;
namespace TestProject1;
public class Tests
{
[Test]
public void Test1()
{
new Class1().Query1();
Assert.Pass();
}
[Test]
public void Test2()
{
new Class1().Query2();
Assert.Pass();
}
}
Expected:
Full branch coverage (no branches at all)
Actual:
Partially covered (1 visits, 1 of 2 branches are covered)
Hi guys!
After updating to .NET 7 new coverage issue was found.
It can be reproduced easily, you just need to reuse the same method group delegate.
Code:
Test:
Expected:
Full branch coverage (no branches at all)
Actual:
Partially covered (1 visits, 1 of 2 branches are covered)
Output:
Report:
Reproduced in .NET 7, Coverlet 3.2.0
The text was updated successfully, but these errors were encountered: