File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,28 +13,22 @@ namespace StyleCop.Analyzers.Test.CSharp7.OrderingRules
1313
1414 public class SA1206CSharp7UnitTests : SA1206UnitTests
1515 {
16- [ Fact ]
17- public async Task TestRefKeywordInStructDeclarationAsync ( )
16+ [ Theory ]
17+ [ InlineData ( "readonly" ) ]
18+ [ InlineData ( "ref" ) ]
19+ [ InlineData ( "readonly ref" ) ]
20+ [ InlineData ( "readonly partial" ) ]
21+ [ InlineData ( "ref partial" ) ]
22+ [ InlineData ( "readonly ref partial" ) ]
23+ [ WorkItem ( 2578 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2578" ) ]
24+ public async Task TestReadonlyRefKeywordInStructDeclarationAsync ( string keywords )
1825 {
19- var testCode = @"class OuterClass
20- {
21- private ref struct BitHelper
22- {
23- }
24- }
25- " ;
26- await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
27- }
28-
29- [ Fact ]
30- public async Task TestReadonlyKeywordInStructDeclarationAsync ( )
31- {
32- var testCode = @"class OuterClass
33- {
34- private readonly struct BitHelper
35- {
36- }
37- }
26+ var testCode = $@ "class OuterClass
27+ {{
28+ private { keywords } struct BitHelper
29+ {{
30+ }}
31+ }}
3832" ;
3933 await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
4034 }
You can’t perform that action at this time.
0 commit comments