@@ -7,10 +7,11 @@ namespace StyleCop.Analyzers.Test.CSharp7.NamingRules
7
7
{
8
8
using System . Threading ;
9
9
using System . Threading . Tasks ;
10
+ using Microsoft . CodeAnalysis . CSharp ;
10
11
using Microsoft . CodeAnalysis . Testing ;
11
- using StyleCop . Analyzers . Lightup ;
12
12
using StyleCop . Analyzers . NamingRules ;
13
13
using Xunit ;
14
+ using static StyleCop . Analyzers . Test . Helpers . LanguageVersionTestExtensions ;
14
15
using static StyleCop . Analyzers . Test . Verifiers . StyleCopCodeFixVerifier <
15
16
StyleCop . Analyzers . NamingRules . SA1316TupleElementNamesShouldUseCorrectCasing ,
16
17
StyleCop . Analyzers . NamingRules . SA1316CodeFixProvider > ;
@@ -116,7 +117,7 @@ public class TestClass
116
117
}}
117
118
" ;
118
119
119
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7 , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
120
+ await VerifyCSharpDiagnosticAsync ( testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
120
121
}
121
122
122
123
/// <summary>
@@ -136,7 +137,7 @@ public class TestClass
136
137
}
137
138
" ;
138
139
139
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7 , testCode , DefaultTestSettings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
140
+ await VerifyCSharpDiagnosticAsync ( testCode , DefaultTestSettings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
140
141
}
141
142
142
143
/// <summary>
@@ -168,7 +169,7 @@ public void TestMethod()
168
169
}}
169
170
" ;
170
171
171
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7_1 , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
172
+ await VerifyCSharpDiagnosticAsync ( LanguageVersion . CSharp7_1 . OrLaterDefault ( ) , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
172
173
}
173
174
174
175
/// <summary>
@@ -204,7 +205,7 @@ public void TestMethod2()
204
205
}}
205
206
" ;
206
207
207
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7_1 , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
208
+ await VerifyCSharpDiagnosticAsync ( LanguageVersion . CSharp7_1 . OrLaterDefault ( ) , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
208
209
}
209
210
210
211
/// <summary>
@@ -257,7 +258,7 @@ public class TestClass
257
258
// diagnostics are specified inline
258
259
} ;
259
260
260
- await VerifyCSharpFixAsync ( LanguageVersionEx . CSharp7 , testCode , settings , expectedDiagnostics , fixedCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
261
+ await VerifyCSharpFixAsync ( testCode , settings , expectedDiagnostics , fixedCode , CancellationToken . None ) . ConfigureAwait ( false ) ;
261
262
}
262
263
263
264
/// <summary>
@@ -287,7 +288,7 @@ public void TestMethod()
287
288
}}
288
289
" ;
289
290
290
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7_1 , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
291
+ await VerifyCSharpDiagnosticAsync ( LanguageVersion . CSharp7_1 . OrLaterDefault ( ) , testCode , settings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
291
292
}
292
293
293
294
/// <summary>
@@ -327,7 +328,7 @@ public void TestMethod2()
327
328
// diagnostics are specified inline
328
329
} ;
329
330
330
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7_1 , testCode , settings , expectedDiagnostics , CancellationToken . None ) . ConfigureAwait ( false ) ;
331
+ await VerifyCSharpDiagnosticAsync ( LanguageVersion . CSharp7_1 . OrLaterDefault ( ) , testCode , settings , expectedDiagnostics , CancellationToken . None ) . ConfigureAwait ( false ) ;
331
332
}
332
333
333
334
[ Fact ]
@@ -398,7 +399,7 @@ public void MethodName((string Name, string Value) obj)
398
399
}
399
400
" ;
400
401
401
- await VerifyCSharpDiagnosticAsync ( LanguageVersionEx . CSharp7 , testCode , DefaultTestSettings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
402
+ await VerifyCSharpDiagnosticAsync ( testCode , DefaultTestSettings , DiagnosticResult . EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
402
403
}
403
404
}
404
405
}
0 commit comments