@@ -60,6 +60,33 @@ public void Method()
6060 await this . VerifyCSharpFixAsync ( testCode , fixedCode ) . ConfigureAwait ( false ) ;
6161 }
6262
63+ [ Fact ]
64+ public async Task TestDocumentationMethodReferenceWithWhitespaceBeforeClosingParenthesisAsync ( )
65+ {
66+ const string testCode = @"
67+ public class Foo
68+ {
69+ /// <see cref=""Method( )""/>
70+ public void Method()
71+ {
72+ }
73+ }" ;
74+ const string fixedCode = @"
75+ public class Foo
76+ {
77+ /// <see cref=""Method()""/>
78+ public void Method()
79+ {
80+ }
81+ }" ;
82+
83+ DiagnosticResult expected = this . CSharpDiagnostic ( ) . WithArguments ( " not" , "preceded" ) . WithLocation ( 4 , 28 ) ;
84+
85+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
86+ await this . VerifyCSharpDiagnosticAsync ( fixedCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
87+ await this . VerifyCSharpFixAsync ( testCode , fixedCode ) . ConfigureAwait ( false ) ;
88+ }
89+
6390 [ Fact ]
6491 public async Task TestMethodWith2CorrectlySpacedParametersAsync ( )
6592 {
@@ -667,6 +694,13 @@ public void TestMethod2(
667694 }
668695
669696 public int TestMethod3(int a) { return a; }
697+
698+ public int TestMethod4(string[] args)
699+ {
700+ #if !(X || NOT )
701+ return 1;
702+ #endif
703+ }
670704}
671705" ;
672706
@@ -698,6 +732,13 @@ public void TestMethod2(
698732 }
699733
700734 public int TestMethod3(int a) { return a; }
735+
736+ public int TestMethod4(string[] args)
737+ {
738+ #if !(X || NOT)
739+ return 1;
740+ #endif
741+ }
701742}
702743" ;
703744
@@ -706,7 +747,8 @@ public void TestMethod2(
706747 this . CSharpDiagnostic ( ) . WithLocation ( 10 , 9 ) . WithArguments ( " not" , "preceded" ) ,
707748 this . CSharpDiagnostic ( ) . WithLocation ( 16 , 7 ) . WithArguments ( " not" , "preceded" ) ,
708749 this . CSharpDiagnostic ( ) . WithLocation ( 21 , 19 ) . WithArguments ( " not" , "preceded" ) ,
709- this . CSharpDiagnostic ( ) . WithLocation ( 25 , 17 ) . WithArguments ( " not" , "preceded" )
750+ this . CSharpDiagnostic ( ) . WithLocation ( 25 , 17 ) . WithArguments ( " not" , "preceded" ) ,
751+ this . CSharpDiagnostic ( ) . WithLocation ( 32 , 16 ) . WithArguments ( " not" , "preceded" ) ,
710752 } ;
711753
712754 await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
0 commit comments