Skip to content

Commit 9348eae

Browse files
committed
#3279 Simplify test, remove unnecessary capture array - not important to reproduce the issue
1 parent dfc58c7 commit 9348eae

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1130UnitTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,9 @@ public class TypeName
892892
{
893893
public void Test()
894894
{
895-
string[] capture = new string[] { ""test"" };
896895
Test2(resolve: delegate
897896
{
898-
return capture.Single(v => v == ""test"");
897+
return """";
899898
});
900899
}
901900
@@ -912,10 +911,9 @@ public class TypeName
912911
{
913912
public void Test()
914913
{
915-
string[] capture = new string[] { ""test"" };
916914
Test2(resolve: arg =>
917915
{
918-
return capture.Single(v => v == ""test"");
916+
return """";
919917
});
920918
}
921919
@@ -927,7 +925,7 @@ private void Test2(string description = null, Func<object, string> resolve = nul
927925

928926
var expected = new[]
929927
{
930-
Diagnostic().WithSpan(9, 24, 9, 32),
928+
Diagnostic().WithSpan(8, 24, 8, 32),
931929
};
932930

933931
await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false);

0 commit comments

Comments
 (0)