diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs index 02173ad14..d099245cb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp10.NamingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using StyleCop.Analyzers.Test.CSharp9.NamingRules; using StyleCop.Analyzers.Test.Verifiers; using Xunit; @@ -43,7 +42,7 @@ public R(int a, int b) }} "; - await new CSharpTest(LanguageVersion.CSharp10) + await new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet60, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs index 6d5bd0724..33b092d9e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs @@ -5,7 +5,6 @@ namespace StyleCop.Analyzers.Test.CSharp10.ReadabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using StyleCop.Analyzers.Test.CSharp9.ReadabilityRules; using StyleCop.Analyzers.Test.Verifiers; using Xunit; @@ -30,7 +29,7 @@ public bool Method(Test arg) } }"; - await new CSharpTest(LanguageVersion.CSharp10) + await new CSharpTest() { ReferenceAssemblies = GenericAnalyzerTest.ReferenceAssembliesNet60, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs index 35c218e60..ab40b101e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs @@ -8,7 +8,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.MaintainabilityRules using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.MaintainabilityRules; @@ -38,7 +37,7 @@ public string TestMethod(int n, object a, object b) } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } /// @@ -76,7 +75,7 @@ public string TestMethod(int n, object a, object b) Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 54), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } /// @@ -99,7 +98,7 @@ public async Task TestMethod(int n, Task a, Task b) } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } /// @@ -141,7 +140,7 @@ public async Task TestMethod(int n, Task a, Task b) Diagnostic(ParenthesesDiagnosticId).WithLocation(2), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } /// @@ -179,7 +178,7 @@ public void TestMethod(int n, object a, object b) Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 48), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } [Theory] @@ -200,7 +199,7 @@ public object TestMethod(int n, string a, string b) }} "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -217,7 +216,7 @@ public unsafe string TestMethod(int n, byte* a, byte* b) } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -235,7 +234,7 @@ public unsafe void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -253,7 +252,7 @@ public void TestMethod() } "; - await new CSharpTest(LanguageVersion.CSharp8) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = testCode, @@ -300,7 +299,7 @@ public void TestMethod() Diagnostic(ParenthesesDiagnosticId).WithLocation(9, 27), }; - var test = new CSharpTest(LanguageVersion.CSharp8) + var test = new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs index 4b23d5acc..d4c234fe5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.MaintainabilityRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.MaintainabilityRules; using Xunit; @@ -57,7 +56,7 @@ public void TestMethod(int input) } "; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, 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.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs index 3dfecc055..730942d52 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; using Xunit; @@ -55,7 +54,7 @@ public void TestMethod(object?[] arguments) Diagnostic().WithArguments(" not", "preceded").WithLocation(9, 40), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs index 4c58fb9a8..85b6098c9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; using Xunit; @@ -59,7 +58,7 @@ public void TestMethod() } "; - await new CSharpTest(LanguageVersion.CSharp8) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs index bbed6b5db..0b86d258b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; using Xunit; @@ -66,7 +65,7 @@ public void TestMethod() } "; - await new CSharpTest(LanguageVersion.CSharp8) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = testCode, @@ -108,7 +107,6 @@ void M((string A, string B) tuple) }; await VerifyCSharpFixAsync( - LanguageVersion.CSharp8, testCode, expectedResults, fixedCode, @@ -146,7 +144,6 @@ void M((bool A, bool B) tuple) }; await VerifyCSharpFixAsync( - LanguageVersion.CSharp8, testCode, expectedResults, fixedCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs index 4574626fd..ede298159 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs @@ -7,10 +7,8 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; - using StyleCop.Analyzers.Test.Verifiers; using Xunit; using static StyleCop.Analyzers.SpacingRules.SA1009ClosingParenthesisMustBeSpacedCorrectly; using static StyleCop.Analyzers.Test.Verifiers.StyleCopCodeFixVerifier< @@ -44,7 +42,7 @@ public void TestMethod() } }"; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -100,7 +98,7 @@ public Derived() Diagnostic(DescriptorNotPreceded).WithLocation(2), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -124,7 +122,7 @@ public class Foo public IDisposable Service => this.TestMethod()!; }"; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -154,7 +152,7 @@ public IDisposable Service() } }"; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); } /// @@ -201,7 +199,7 @@ public string TestMethod() } "; - await new CSharpTest(LanguageVersion.CSharp8) + await new CSharpTest() { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = testCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs index 2e1b59158..b0ce402cb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; using Xunit; @@ -37,7 +36,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -56,7 +55,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } [Fact] @@ -105,7 +104,7 @@ public void TestMethod(object?[] arguments) Diagnostic().WithArguments(" not", "followed").WithLocation(12, 36), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs index 4ceb0b93e..ec85c0800 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; using Xunit; @@ -56,7 +55,6 @@ void M((string A, string B) tuple) }; await VerifyCSharpFixAsync( - LanguageVersion.CSharp8, testCode, expectedResults, fixedCode, diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs index 2befcc1b0..590e9568d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; @@ -91,7 +90,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp8, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs index 203bf369b..eee8bfccf 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs @@ -7,7 +7,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules { using System.Threading; using System.Threading.Tasks; - using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp7.SpacingRules; using Xunit; @@ -64,7 +63,7 @@ public void TestMethod(object?[] arguments) Diagnostic(DescriptorNotPreceded).WithArguments("?").WithLocation(12, 40), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp8, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } } } 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 =