-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
bugSomething isn't workingSomething isn't workingtenet-coverageIssue related to possible incorrect coverageIssue related to possible incorrect coverage
Description
This code
public class Class1
{
[ExcludeFromCodeCoverage]
public int F1(string input)
{
Func<char, int> f = (c => { return (int)c; });
return input.Select(x =>
{
var l = new List<char> { x };
return l.Select(f).Last();
}).Sum();
}
[ExcludeFromCodeCoverage]
public IEnumerable<int> F2(string input)
{
foreach (char c in input)
{
yield return c;
}
}
[ExcludeFromCodeCoverage]
public async Task<string> F3(string input)
{
var f = new StreamReader(File.OpenRead(input));
var r = await f.ReadToEndAsync();
return r;
}
public static string F4(string input)
{
return input.ToUpperInvariant();
}
[ExcludeFromCodeCoverage]
public string F5(string input)
{
return input.ToUpperInvariant();
}
}
with a test to exercise method F4
.
Expect just method F4
in the coverage file, with 100% coverage
Get 15.8% line coverage, with the lambda expressions in F1
and generated MoveNext
methods in the implementations of F2
and F3
showing uncovered.
mcaden, ArnoldZokas, Bio2hazard, arphox, jmoralesv and 1 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtenet-coverageIssue related to possible incorrect coverageIssue related to possible incorrect coverage