Skip to content

Commit

Permalink
Simplify tests (#75977)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi authored Nov 22, 2024
2 parents 6963ba3 + 5197c8e commit 45e24db
Show file tree
Hide file tree
Showing 57 changed files with 11 additions and 422 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ internal class C : I<C>
var test = new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
LanguageVersion = LanguageVersion.CSharp12,
ReferenceAssemblies = Testing.ReferenceAssemblies.Net.Net60
};
Expand All @@ -645,7 +644,6 @@ public async Task TestFileDeclaration(string declarationKind)
await new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
LanguageVersion = LanguageVersion.CSharp12,
}.RunAsync();
}
Expand All @@ -658,7 +656,6 @@ public async Task TestFileDelegate()
await new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
LanguageVersion = LanguageVersion.CSharp12,
}.RunAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ class X {
await new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
}.RunAsync();
}

Expand All @@ -734,7 +733,6 @@ class X {
await new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
}.RunAsync();
}

Expand All @@ -751,7 +749,6 @@ class X {
await new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
}.RunAsync();
}

Expand Down Expand Up @@ -1457,7 +1454,6 @@ class X {
await new VerifyCS.Test
{
TestCode = source,
FixedCode = source,
}.RunAsync();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ namespace N {}
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
Options =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace N
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp9,
Options =
{
Expand All @@ -49,7 +48,6 @@ namespace N
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
Options =
{
Expand Down Expand Up @@ -115,7 +113,6 @@ namespace N2
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
Options =
{
Expand All @@ -138,7 +135,6 @@ namespace N2
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
Options =
{
Expand All @@ -160,7 +156,6 @@ namespace N
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
Options =
{
Expand All @@ -182,7 +177,6 @@ namespace N
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
ExpectedDiagnostics =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ void M(int i)
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = CSharp9,
}.RunAsync();
}
Expand Down
5 changes: 0 additions & 5 deletions src/Analyzers/CSharp/Tests/FileHeaders/FileHeaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace N
await new VerifyCS.Test
{
TestCode = testCode,
FixedCode = testCode,
EditorConfig = $@"
[*]
{fileHeaderTemplate}
Expand Down Expand Up @@ -242,7 +241,6 @@ namespace Bar
await new VerifyCS.Test
{
TestCode = testCode,
FixedCode = testCode,
EditorConfig = TestSettings,
}.RunAsync();
}
Expand All @@ -267,7 +265,6 @@ namespace Bar
await new VerifyCS.Test
{
TestCode = testCode,
FixedCode = testCode,
EditorConfig = TestSettings,
}.RunAsync();
}
Expand All @@ -291,7 +288,6 @@ namespace Bar
await new VerifyCS.Test
{
TestCode = testCode,
FixedCode = testCode,
EditorConfig = TestSettings,
}.RunAsync();
}
Expand Down Expand Up @@ -442,7 +438,6 @@ namespace Bar
await new VerifyCS.Test
{
TestCode = testCode,
FixedCode = testCode,
EditorConfig = TestSettings,
}.RunAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ async C M()
await new VerifyCS.Test
{
TestCode = markup,
FixedCode = markup,
ReferenceAssemblies = ReferenceAssemblies.Net.Net60
}.RunAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ private static async Task TestRefactoringMissingAsync(string source)
await new VerifyRefactoring.Test
{
TestCode = source,
FixedCode = source,
LanguageVersion = LanguageVersion.CSharp10,
}.RunAsync();
}
Expand All @@ -78,7 +77,6 @@ private static async Task TestCodeFixMissingAsync(string source)
await new VerifyCodeFix.Test
{
TestCode = source,
FixedCode = source,
LanguageVersion = LanguageVersion.CSharp10,
}.RunAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11924,7 +11924,6 @@ event System.EventHandler I.Click
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
//LanguageVersion = LanguageVersion.CSharp12,
ExpectedDiagnostics =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ void N(Action<int> a)
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp8
}.RunAsync();
}
Expand Down Expand Up @@ -82,7 +81,6 @@ void N(Action<int> a)
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp9,
Options =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ class MyClass
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp11,
ReferenceAssemblies = ReferenceAssemblies.Net.Net60,
}.RunAsync();
Expand Down Expand Up @@ -204,7 +203,6 @@ class MyClass
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp11,
ReferenceAssemblies = ReferenceAssemblies.Net.Net70
}.RunAsync();
Expand Down Expand Up @@ -453,7 +451,6 @@ class MyClass
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp10,
ReferenceAssemblies = ReferenceAssemblies.Net.Net70
}.RunAsync();
Expand All @@ -475,7 +472,6 @@ class MyClass
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp11,
ReferenceAssemblies = ReferenceAssemblies.Net.Net70
}.RunAsync();
Expand All @@ -496,7 +492,6 @@ class MyClass
await new VerifyCS.Test
{
TestCode = code,
FixedCode = code,
LanguageVersion = LanguageVersion.CSharp11,
ReferenceAssemblies = ReferenceAssemblies.Net.Net70
}.RunAsync();
Expand Down
Loading

0 comments on commit 45e24db

Please sign in to comment.