File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules Expand file tree Collapse file tree 1 file changed +27
-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 . StyleCopCodeFixVerifier <
12+ StyleCop . Analyzers . ReadabilityRules . SA1112ClosingParenthesisMustBeOnLineOfOpeningParenthesis ,
13+ StyleCop . Analyzers . SpacingRules . TokenSpacingCodeFixProvider > ;
714
815 public partial class SA1112CSharp9UnitTests : SA1112CSharp8UnitTests
916 {
17+ [ Fact ]
18+ [ WorkItem ( 3973 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3973" ) ]
19+ public async Task TestStaticAnonymousMethodClosingParenthesisOnNextLineAsync ( )
20+ {
21+ var testCode = @"using System;
22+
23+ public class TestClass
24+ {
25+ public void TestMethod()
26+ {
27+ Action action = static delegate(
28+ {|#0:)|}
29+ {
30+ };
31+ }
32+ }
33+ " ;
34+
35+ await VerifyCSharpDiagnosticAsync ( testCode , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
36+ }
1037 }
1138}
You can’t perform that action at this time.
0 commit comments