Skip to content

Commit 93f9dce

Browse files
committed
Use markup syntax for diagnostic location in tests
1 parent 8484e25 commit 93f9dce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1008CSharp7UnitTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -997,11 +997,11 @@ void TestMethod2([NotNull, Custom] (string, string) tuple) { }
997997
998998
void TestMethod3([NotNull][Custom] (string, string) tuple) { }
999999
1000-
void TestMethod4([NotNull](string, string) tuple) { }
1000+
void TestMethod4([NotNull]{|#0:(|}string, string) tuple) { }
10011001
1002-
void TestMethod5([NotNull, Custom](string, string) tuple) { }
1002+
void TestMethod5([NotNull, Custom]{|#1:(|}string, string) tuple) { }
10031003
1004-
void TestMethod6([NotNull][Custom](string, string) tuple) { }
1004+
void TestMethod6([NotNull][Custom]{|#2:(|}string, string) tuple) { }
10051005
}
10061006
}
10071007
";
@@ -1031,9 +1031,9 @@ void TestMethod6([NotNull][Custom] (string, string) tuple) { }
10311031

10321032
DiagnosticResult[] expectedDiagnostics =
10331033
{
1034-
Diagnostic(DescriptorPreceded).WithLocation(15, 35),
1035-
Diagnostic(DescriptorPreceded).WithLocation(17, 43),
1036-
Diagnostic(DescriptorPreceded).WithLocation(19, 43),
1034+
Diagnostic(DescriptorPreceded).WithLocation(0),
1035+
Diagnostic(DescriptorPreceded).WithLocation(1),
1036+
Diagnostic(DescriptorPreceded).WithLocation(2),
10371037
};
10381038

10391039
await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false);

0 commit comments

Comments
 (0)