File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 33
44namespace StyleCop . Analyzers . Test . CSharp9 . ReadabilityRules
55{
6+ using System . Threading ;
7+ using System . Threading . Tasks ;
8+ using Microsoft . CodeAnalysis . Testing ;
69 using StyleCop . Analyzers . Test . CSharp8 . ReadabilityRules ;
10+ using Xunit ;
11+ using static StyleCop . Analyzers . Test . Verifiers . StyleCopDiagnosticVerifier < StyleCop . Analyzers . ReadabilityRules . SA1114ParameterListMustFollowDeclaration > ;
712
813 public partial class SA1114CSharp9UnitTests : SA1114CSharp8UnitTests
914 {
15+ [ Fact ]
16+ [ WorkItem ( 3973 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3973" ) ]
17+ public async Task TestStaticAnonymousFunctionParameterListAfterBlankLineAsync ( )
18+ {
19+ var testCode = @"using System;
20+
21+ public class TestClass
22+ {
23+ public void TestMethod()
24+ {
25+ Action<int> action = static (
26+
27+ {|#0:int value|}) => value++;
28+ }
29+ }
30+ " ;
31+
32+ var expected = Diagnostic ( ) . WithLocation ( 0 ) ;
33+ await VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
34+ }
1035 }
1136}
You can’t perform that action at this time.
0 commit comments