diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs index 1bbf059ed..e88bd35f4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs @@ -8,7 +8,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.LayoutRules using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.LayoutRules; using Xunit; @@ -36,7 +35,7 @@ public async Task TestUsingAndGlobalStatementSpacingInTopLevelProgramAsync() return 0; "; - var test = new CSharpTest(LanguageVersion.CSharp9) + var test = new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestState = @@ -63,7 +62,7 @@ public async Task TestGlobalStatementSpacingInTopLevelProgramAsync() return i; "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestState = @@ -90,7 +89,7 @@ public async Task TestGlobalStatementAndRecordSpacingInTopLevelProgramAsync() record A(); "; - var test = new CSharpTest(LanguageVersion.CSharp9) + var test = new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestState = diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs index 4b172e9ed..9dcd5059f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.MaintainabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.MaintainabilityRules; using Xunit; @@ -35,7 +34,7 @@ public object TestMethod(Foo n, int a) } "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, @@ -71,7 +70,7 @@ public object TestMethod(Foo n, int a) } "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, @@ -113,7 +112,7 @@ public void TestMethod(Foo n, int a) } "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, @@ -147,7 +146,7 @@ public object TestMethod(Foo n, int a) }} "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs index 2d5443c2b..d85368205 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.MaintainabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.MaintainabilityRules; using Xunit; @@ -64,7 +63,7 @@ void M() } "; - await VerifyCSharpFixAsync(LanguageVersion.CSharp9, testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs index 47e80b9c1..be42e3823 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.NamingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.NamingRules; using StyleCop.Analyzers.Test.Verifiers; @@ -41,7 +40,7 @@ public R(int a, int b) } "; - var test = new CSharpTest(LanguageVersion.CSharp9) + var test = new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet50, TestCode = testCode, @@ -75,7 +74,7 @@ public R(int a, int b) } "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs index 6e598c92b..96a628d23 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.NamingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using StyleCop.Analyzers.Test.CSharp8.NamingRules; using StyleCop.Analyzers.Test.Verifiers; using Xunit; @@ -42,7 +41,7 @@ public R(int a, int b) } "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9OutsideNamespaceUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9OutsideNamespaceUnitTests.cs index f35d5c329..5c778f5e2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9OutsideNamespaceUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9OutsideNamespaceUnitTests.cs @@ -8,7 +8,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.OrderingRules using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.OrderingRules; using Xunit; @@ -33,7 +32,7 @@ public async Task TestValidUsingStatementsInTopLevelProgramAsync() return 0; "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestState = diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9PreserveUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9PreserveUnitTests.cs index d6b3d17ab..8acfb25de 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9PreserveUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9PreserveUnitTests.cs @@ -8,7 +8,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.OrderingRules using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.OrderingRules; using Xunit; @@ -33,7 +32,7 @@ public async Task TestValidUsingStatementsInTopLevelProgramAsync() return 0; "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestState = diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs index 87cc07a46..eb81ab3bc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs @@ -8,7 +8,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.OrderingRules using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.OrderingRules; using Xunit; @@ -33,7 +32,7 @@ public async Task TestValidUsingStatementsInTopLevelProgramAsync() return 0; "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestState = diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs index 93d44988b..8e29d86dd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs @@ -5,7 +5,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.ReadabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using StyleCop.Analyzers.Test.CSharp8.ReadabilityRules; using StyleCop.Analyzers.Test.Verifiers; using Xunit; @@ -32,7 +31,7 @@ public A UpdateA(A value) } }"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs index ff0953eae..ad65e7e6c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.ReadabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.ReadabilityRules; using Xunit; @@ -23,7 +22,7 @@ public async Task TestNoDiagnosticForEmptyRecordDeclarationAsync() { var testCode = @"public record Result(int Value);"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs index 794c4d027..ded3a7f7b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.ReadabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.ReadabilityRules; using Xunit; @@ -39,7 +38,7 @@ r with } }"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, @@ -71,7 +70,7 @@ r with } }"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, @@ -103,7 +102,7 @@ public void MyCallingFunction(int index, MyObject myObject) } }"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs index 948c0129a..37485b907 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.SpacingRules { using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.SpacingRules; using Xunit; @@ -18,7 +17,7 @@ public async Task TestTargetTypedNewAsync() { string statementWithoutSpace = "int a = new();"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, languageVersion: LanguageVersion.CSharp9).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs index 038c0d056..76cbe2dd1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.SpacingRules; using Xunit; @@ -43,7 +42,7 @@ void Method(int b) } }"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, ExpectedDiagnostics = diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs index 64b6800a7..2649408d7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.SpacingRules; using Xunit; @@ -33,7 +32,7 @@ public record MyQuery1() : BaseQuery; public record MyQuery2() : BaseQuery; public record MyQuery3() : BaseQuery;"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, ExpectedDiagnostics = diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs index b872ec71f..3acea4d49 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs @@ -7,8 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; - using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.SpacingRules; using StyleCop.Analyzers.Test.Verifiers; using Xunit; @@ -42,7 +40,7 @@ public async Task TestFunctionPointerParameterInvalidSpacingAsync() Diagnostic(DescriptorNotFollowed).WithLocation(1), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp9, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -70,7 +68,7 @@ public async Task TestFunctionPointerTypeInvalidSpacingAsync() } "; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet50, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs index 46b27d434..2f328bd67 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp9.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.SpacingRules; using Xunit; @@ -33,7 +32,7 @@ public record MyQuery1() : BaseQuery; public record MyQuery2() : BaseQuery; public record MyQuery3() : BaseQuery;"; - await new CSharpTest(LanguageVersion.CSharp9) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, ExpectedDiagnostics =