From 282b3d08e2ab787c0c11d9f36ba44c8d8d04de0f Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 19 Nov 2024 12:07:22 -0800 Subject: [PATCH 1/2] Simplify tests --- .../AddAccessibilityModifiersTests.cs | 3 - .../ConflictMarkerResolutionTests.cs | 4 -- ...vertToBlockScopedNamespaceAnalyzerTests.cs | 1 - ...nvertToFileScopedNamespaceAnalyzerTests.cs | 6 -- ...ConvertSwitchStatementToExpressionTests.cs | 1 - .../Tests/FileHeaders/FileHeaderTests.cs | 5 -- .../Tests/FixReturnType/FixReturnTypeTests.cs | 1 - .../GenerateDefaultConstructorsTests.cs | 2 - .../ImplementInterfaceTests.cs | 1 - .../MakeAnonymousFunctionStaticTests.cs | 2 - .../MakeMemberRequiredTests.cs | 5 -- .../MakeStructMemberReadOnlyTests.cs | 28 --------- .../MakeTypePartial/MakeTypePartialTests.cs | 1 - .../ArrowExpressionClausePlacementTests.cs | 11 ---- .../ConditionalExpressionPlacementTests.cs | 12 ---- .../ConsecutiveBracePlacementTests.cs | 19 ------- .../ConsecutiveStatementPlacementTests.cs | 15 ----- .../ConstructorInitializerPlacementTests.cs | 5 -- .../EmbeddedStatementPlacementTests.cs | 3 - .../MultipleBlankLinesTests.cs | 16 ------ .../RemoveUnnecessaryCastTests.cs | 57 ------------------- .../RemoveUnnecessaryLambdaExpressionTests.cs | 1 - .../RemoveUnusedMembersTests.cs | 1 - .../RemoveUnusedValueAssignmentTests.cs | 9 --- ...eExpressionForIfNullStatementCheckTests.cs | 11 ---- .../UseCollectionInitializerTests.cs | 1 - .../UseCompoundAssignmentTests.cs | 3 - .../UseCompoundCoalesceAssignmentTests.cs | 1 - ...ConditionalExpressionForAssignmentTests.cs | 1 - .../UseDefaultLiteralTests.cs | 14 ----- .../UseExplicitTupleNameTests.cs | 3 - ...ExpressionBodyForAccessorsAnalyzerTests.cs | 1 - .../UseIndexOperatorTests.cs | 11 ---- .../UseRangeOperatorTests.cs | 5 -- .../UseNullPropagationTests.cs | 1 - .../UseObjectInitializerTests.cs | 1 - .../CSharpAsAndMemberAccessTests.cs | 17 ------ .../Tests/UseTupleSwap/UseTupleSwapTests.cs | 13 ----- ...ateEqualsAndGetHashCodeFromMembersTests.cs | 1 - .../AddParameterCheckTests.cs | 22 ++----- .../CSharpMoveStaticMembersTests.cs | 9 --- .../ConvertDirectCastToTryCastTests.cs | 3 - .../ConvertTryCastToDirectCastTests.cs | 2 - .../ConvertIfToSwitchTests.cs | 7 --- .../ConvertNamespaceRefactoringTests.cs | 13 ----- .../ConvertToProgramMainAnalyzerTests.cs | 4 -- .../ConvertToProgramMainRefactoringTests.cs | 5 -- ...onvertToTopLevelStatementsAnalyzerTests.cs | 26 --------- ...ertToTopLevelStatementsRefactoringTests.cs | 7 --- ...tConcatenationToInterpolatedStringTests.cs | 2 - .../JsonStringDetectorTests.cs | 2 - .../EnableNullable/EnableNullableTests.cs | 1 - .../ExtractClass/ExtractClassTests.cs | 22 ++----- ...ddConstructorParametersFromMembersTests.cs | 1 - .../SimplifyPropertyPatternTests.cs | 9 --- .../UseNameofInAttributeTests.cs | 4 -- 56 files changed, 10 insertions(+), 422 deletions(-) diff --git a/src/Analyzers/CSharp/Tests/AddAccessibilityModifiers/AddAccessibilityModifiersTests.cs b/src/Analyzers/CSharp/Tests/AddAccessibilityModifiers/AddAccessibilityModifiersTests.cs index 28a7bdb9bd464..8f432ae3a5330 100644 --- a/src/Analyzers/CSharp/Tests/AddAccessibilityModifiers/AddAccessibilityModifiersTests.cs +++ b/src/Analyzers/CSharp/Tests/AddAccessibilityModifiers/AddAccessibilityModifiersTests.cs @@ -622,7 +622,6 @@ internal class C : I var test = new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp12, ReferenceAssemblies = Testing.ReferenceAssemblies.Net.Net60 }; @@ -645,7 +644,6 @@ public async Task TestFileDeclaration(string declarationKind) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp12, }.RunAsync(); } @@ -658,7 +656,6 @@ public async Task TestFileDelegate() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp12, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/ConflictMarkerResolution/ConflictMarkerResolutionTests.cs b/src/Analyzers/CSharp/Tests/ConflictMarkerResolution/ConflictMarkerResolutionTests.cs index 59ff1fc342f65..c843828b45629 100644 --- a/src/Analyzers/CSharp/Tests/ConflictMarkerResolution/ConflictMarkerResolutionTests.cs +++ b/src/Analyzers/CSharp/Tests/ConflictMarkerResolution/ConflictMarkerResolutionTests.cs @@ -717,7 +717,6 @@ class X { await new VerifyCS.Test { TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -734,7 +733,6 @@ class X { await new VerifyCS.Test { TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -751,7 +749,6 @@ class X { await new VerifyCS.Test { TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -1457,7 +1454,6 @@ class X { await new VerifyCS.Test { TestCode = source, - FixedCode = source, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToBlockScopedNamespaceAnalyzerTests.cs b/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToBlockScopedNamespaceAnalyzerTests.cs index aa486c15513a7..123ccc7a55a15 100644 --- a/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToBlockScopedNamespaceAnalyzerTests.cs +++ b/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToBlockScopedNamespaceAnalyzerTests.cs @@ -81,7 +81,6 @@ namespace N {} await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { diff --git a/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToFileScopedNamespaceAnalyzerTests.cs b/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToFileScopedNamespaceAnalyzerTests.cs index dcb3bff374a04..78e14b88c340c 100644 --- a/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToFileScopedNamespaceAnalyzerTests.cs +++ b/src/Analyzers/CSharp/Tests/ConvertNamespace/ConvertToFileScopedNamespaceAnalyzerTests.cs @@ -29,7 +29,6 @@ namespace N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, Options = { @@ -49,7 +48,6 @@ namespace N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -115,7 +113,6 @@ namespace N2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -138,7 +135,6 @@ namespace N2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -160,7 +156,6 @@ namespace N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -182,7 +177,6 @@ namespace N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, ExpectedDiagnostics = { diff --git a/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs b/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs index 298041054b5aa..753c56b4a8cc8 100644 --- a/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs +++ b/src/Analyzers/CSharp/Tests/ConvertSwitchStatementToExpression/ConvertSwitchStatementToExpressionTests.cs @@ -630,7 +630,6 @@ void M(int i) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = CSharp9, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/FileHeaders/FileHeaderTests.cs b/src/Analyzers/CSharp/Tests/FileHeaders/FileHeaderTests.cs index 70a4e835c508c..fc47c9a461a8a 100644 --- a/src/Analyzers/CSharp/Tests/FileHeaders/FileHeaderTests.cs +++ b/src/Analyzers/CSharp/Tests/FileHeaders/FileHeaderTests.cs @@ -44,7 +44,6 @@ namespace N await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, EditorConfig = $@" [*] {fileHeaderTemplate} @@ -242,7 +241,6 @@ namespace Bar await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, EditorConfig = TestSettings, }.RunAsync(); } @@ -267,7 +265,6 @@ namespace Bar await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, EditorConfig = TestSettings, }.RunAsync(); } @@ -291,7 +288,6 @@ namespace Bar await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, EditorConfig = TestSettings, }.RunAsync(); } @@ -442,7 +438,6 @@ namespace Bar await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, EditorConfig = TestSettings, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/FixReturnType/FixReturnTypeTests.cs b/src/Analyzers/CSharp/Tests/FixReturnType/FixReturnTypeTests.cs index cddfb81f7d86c..dd6daad80c85e 100644 --- a/src/Analyzers/CSharp/Tests/FixReturnType/FixReturnTypeTests.cs +++ b/src/Analyzers/CSharp/Tests/FixReturnType/FixReturnTypeTests.cs @@ -500,7 +500,6 @@ async C M() await new VerifyCS.Test { TestCode = markup, - FixedCode = markup, ReferenceAssemblies = ReferenceAssemblies.Net.Net60 }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/GenerateDefaultConstructors/GenerateDefaultConstructorsTests.cs b/src/Analyzers/CSharp/Tests/GenerateDefaultConstructors/GenerateDefaultConstructorsTests.cs index 8eec2a263228e..a1da44a8f2dfd 100644 --- a/src/Analyzers/CSharp/Tests/GenerateDefaultConstructors/GenerateDefaultConstructorsTests.cs +++ b/src/Analyzers/CSharp/Tests/GenerateDefaultConstructors/GenerateDefaultConstructorsTests.cs @@ -66,7 +66,6 @@ private static async Task TestRefactoringMissingAsync(string source) await new VerifyRefactoring.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -78,7 +77,6 @@ private static async Task TestCodeFixMissingAsync(string source) await new VerifyCodeFix.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceTests.cs b/src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceTests.cs index 1fcfb16183639..ef616c40e1044 100644 --- a/src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceTests.cs +++ b/src/Analyzers/CSharp/Tests/ImplementInterface/ImplementInterfaceTests.cs @@ -11924,7 +11924,6 @@ event System.EventHandler I.Click await new VerifyCS.Test { TestCode = code, - FixedCode = code, //LanguageVersion = LanguageVersion.CSharp12, ExpectedDiagnostics = { diff --git a/src/Analyzers/CSharp/Tests/MakeAnonymousFunctionStatic/MakeAnonymousFunctionStaticTests.cs b/src/Analyzers/CSharp/Tests/MakeAnonymousFunctionStatic/MakeAnonymousFunctionStaticTests.cs index d3e2d6a664fa5..8809c0bf1db00 100644 --- a/src/Analyzers/CSharp/Tests/MakeAnonymousFunctionStatic/MakeAnonymousFunctionStaticTests.cs +++ b/src/Analyzers/CSharp/Tests/MakeAnonymousFunctionStatic/MakeAnonymousFunctionStaticTests.cs @@ -52,7 +52,6 @@ void N(Action a) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -82,7 +81,6 @@ void N(Action a) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, Options = { diff --git a/src/Analyzers/CSharp/Tests/MakeMemberRequired/MakeMemberRequiredTests.cs b/src/Analyzers/CSharp/Tests/MakeMemberRequired/MakeMemberRequiredTests.cs index 877aaf5f02adb..3af2b2741c6af 100644 --- a/src/Analyzers/CSharp/Tests/MakeMemberRequired/MakeMemberRequiredTests.cs +++ b/src/Analyzers/CSharp/Tests/MakeMemberRequired/MakeMemberRequiredTests.cs @@ -135,7 +135,6 @@ class MyClass await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net60, }.RunAsync(); @@ -204,7 +203,6 @@ class MyClass await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net70 }.RunAsync(); @@ -453,7 +451,6 @@ class MyClass await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, ReferenceAssemblies = ReferenceAssemblies.Net.Net70 }.RunAsync(); @@ -475,7 +472,6 @@ class MyClass await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net70 }.RunAsync(); @@ -496,7 +492,6 @@ class MyClass await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net70 }.RunAsync(); diff --git a/src/Analyzers/CSharp/Tests/MakeStructMemberReadOnly/MakeStructMemberReadOnlyTests.cs b/src/Analyzers/CSharp/Tests/MakeStructMemberReadOnly/MakeStructMemberReadOnlyTests.cs index d607fc390888c..9b914d0ea1da3 100644 --- a/src/Analyzers/CSharp/Tests/MakeStructMemberReadOnly/MakeStructMemberReadOnlyTests.cs +++ b/src/Analyzers/CSharp/Tests/MakeStructMemberReadOnly/MakeStructMemberReadOnlyTests.cs @@ -53,7 +53,6 @@ void M() { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -69,7 +68,6 @@ void M() { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -85,7 +83,6 @@ readonly void M() { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -104,7 +101,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -125,7 +121,6 @@ static void G(ref S s) { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -149,7 +144,6 @@ public static void G(ref this S s) { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -295,7 +289,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -315,7 +308,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -337,7 +329,6 @@ static void G(ref int x) { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -359,7 +350,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -379,7 +369,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -403,7 +392,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -428,7 +416,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -453,7 +440,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -469,7 +455,6 @@ void M() { } await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -507,7 +492,6 @@ struct S await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -919,7 +903,6 @@ unsafe void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -944,7 +927,6 @@ void X() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -966,7 +948,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -991,7 +972,6 @@ void X() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -1016,7 +996,6 @@ void X() await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -1167,7 +1146,6 @@ void M() await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, }.RunAsync(); } @@ -1194,7 +1172,6 @@ void Dispose() await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, }.RunAsync(); } @@ -1252,7 +1229,6 @@ struct T where X : IComparable await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, }.RunAsync(); } @@ -1270,7 +1246,6 @@ struct T where X : struct, IComparable await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, }.RunAsync(); } @@ -1310,7 +1285,6 @@ struct S await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -1329,7 +1303,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } @@ -1348,7 +1321,6 @@ void M() await new VerifyCS.Test { TestCode = test, - FixedCode = test, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/MakeTypePartial/MakeTypePartialTests.cs b/src/Analyzers/CSharp/Tests/MakeTypePartial/MakeTypePartialTests.cs index 377704d006a21..f58d5f83e2b14 100644 --- a/src/Analyzers/CSharp/Tests/MakeTypePartial/MakeTypePartialTests.cs +++ b/src/Analyzers/CSharp/Tests/MakeTypePartial/MakeTypePartialTests.cs @@ -376,7 +376,6 @@ namespace TestNamespace2 await new VerifyCS.Test { TestCode = markup, - FixedCode = markup, LanguageVersion = LanguageVersion.CSharp10 }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/NewLines/ArrowExpressionClausePlacement/ArrowExpressionClausePlacementTests.cs b/src/Analyzers/CSharp/Tests/NewLines/ArrowExpressionClausePlacement/ArrowExpressionClausePlacementTests.cs index 46710ac1f8dbe..f1a7c333867f5 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/ArrowExpressionClausePlacement/ArrowExpressionClausePlacementTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/ArrowExpressionClausePlacement/ArrowExpressionClausePlacementTests.cs @@ -34,7 +34,6 @@ public int Add() => await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -53,7 +52,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -72,7 +70,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -94,7 +91,6 @@ public void Main() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -119,7 +115,6 @@ public void Goo(System.Func action) { } await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -171,7 +166,6 @@ public int Add await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -255,7 +249,6 @@ public int Add(int{|CS1001:)|} => await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -275,7 +268,6 @@ public int Add() => await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -295,7 +287,6 @@ public int Add() => await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -317,7 +308,6 @@ public int Add() => await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -339,7 +329,6 @@ public int Add() => await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInArrowExpressionClause, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/NewLines/ConditionalExpressionPlacement/ConditionalExpressionPlacementTests.cs b/src/Analyzers/CSharp/Tests/NewLines/ConditionalExpressionPlacement/ConditionalExpressionPlacementTests.cs index b4e535b6ca768..de48866e2e01c 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/ConditionalExpressionPlacement/ConditionalExpressionPlacementTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/ConditionalExpressionPlacement/ConditionalExpressionPlacementTests.cs @@ -37,7 +37,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -98,7 +97,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -122,7 +120,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -146,7 +143,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -169,7 +165,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -192,7 +187,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -215,7 +209,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -241,7 +234,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -267,7 +259,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -293,7 +284,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -319,7 +309,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -345,7 +334,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterTokenInConditionalExpression, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveBracePlacement/ConsecutiveBracePlacementTests.cs b/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveBracePlacement/ConsecutiveBracePlacementTests.cs index 0fffe3768cf00..47f074cc96a13 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveBracePlacement/ConsecutiveBracePlacementTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveBracePlacement/ConsecutiveBracePlacementTests.cs @@ -26,7 +26,6 @@ public async Task NotForBracesOnSameLineDirectlyTouching() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -40,7 +39,6 @@ public async Task NotForBracesOnSameLineWithSpace() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -54,7 +52,6 @@ public async Task NotForBracesOnSameLineWithComment() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -68,7 +65,6 @@ public async Task NotForBracesOnSameLineWithCommentAndSpaces() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -89,7 +85,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -110,7 +105,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -131,7 +125,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -155,7 +148,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -179,7 +171,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -203,7 +194,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -227,7 +217,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -251,7 +240,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -275,7 +263,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); @@ -303,7 +290,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -330,7 +316,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -357,7 +342,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); @@ -411,7 +395,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.TrueWithSuggestionEnforcement } } }.RunAsync(); } @@ -817,7 +800,6 @@ internal interface IOption2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); @@ -864,7 +846,6 @@ internal interface IOption2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CSharpCodeStyleOptions.AllowBlankLinesBetweenConsecutiveBraces, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); diff --git a/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveStatementPlacement/ConsecutiveStatementPlacementTests.cs b/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveStatementPlacement/ConsecutiveStatementPlacementTests.cs index 8b7a4122d28b4..744d87aad7170 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveStatementPlacement/ConsecutiveStatementPlacementTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/ConsecutiveStatementPlacement/ConsecutiveStatementPlacementTests.cs @@ -32,7 +32,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -52,7 +51,6 @@ void Y() { } await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -74,7 +72,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -96,7 +93,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -121,7 +117,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -146,7 +141,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -172,7 +166,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -198,7 +191,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -224,7 +216,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -250,7 +241,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -277,7 +267,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -303,7 +292,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -333,7 +321,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -391,7 +378,6 @@ void M() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -941,7 +927,6 @@ public void TestTernaryConstruction() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowStatementImmediatelyAfterBlock, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/NewLines/ConstructorInitializerPlacement/ConstructorInitializerPlacementTests.cs b/src/Analyzers/CSharp/Tests/NewLines/ConstructorInitializerPlacement/ConstructorInitializerPlacementTests.cs index da77078eaf284..a65f1879335f7 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/ConstructorInitializerPlacement/ConstructorInitializerPlacementTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/ConstructorInitializerPlacement/ConstructorInitializerPlacementTests.cs @@ -34,7 +34,6 @@ public C() : await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterColonInConstructorInitializer, CodeStyleOption2.TrueWithSilentEnforcement } } }.RunAsync(); } @@ -88,7 +87,6 @@ public C() : base() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterColonInConstructorInitializer, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -110,7 +108,6 @@ public C() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterColonInConstructorInitializer, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -132,7 +129,6 @@ public C() : //comment await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterColonInConstructorInitializer, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -258,7 +254,6 @@ public C() : await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.AllowBlankLineAfterColonInConstructorInitializer, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/NewLines/EmbeddedStatementPlacement/EmbeddedStatementPlacementTests.cs b/src/Analyzers/CSharp/Tests/NewLines/EmbeddedStatementPlacement/EmbeddedStatementPlacementTests.cs index 8388ab43f13c9..cda350f8e7e79 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/EmbeddedStatementPlacement/EmbeddedStatementPlacementTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/EmbeddedStatementPlacement/EmbeddedStatementPlacementTests.cs @@ -33,7 +33,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.AllowEmbeddedStatementsOnSameLine, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -106,7 +105,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.AllowEmbeddedStatementsOnSameLine, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -202,7 +200,6 @@ int Prop2 await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.AllowEmbeddedStatementsOnSameLine, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/NewLines/MultipleBlankLines/MultipleBlankLinesTests.cs b/src/Analyzers/CSharp/Tests/NewLines/MultipleBlankLines/MultipleBlankLinesTests.cs index b1dcc6edc3e62..e997fbbbeef2c 100644 --- a/src/Analyzers/CSharp/Tests/NewLines/MultipleBlankLines/MultipleBlankLinesTests.cs +++ b/src/Analyzers/CSharp/Tests/NewLines/MultipleBlankLines/MultipleBlankLinesTests.cs @@ -27,7 +27,6 @@ public async Task TestOneBlankLineAtTopOfFile() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -62,7 +61,6 @@ public async Task TestTwoBlankLineAtTopOfFile_NotWithOptionOff() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.TrueWithSuggestionEnforcement } } }.RunAsync(); } @@ -118,7 +116,6 @@ public async Task TestOneBlankLineAtTopOfEmptyFile() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -194,7 +191,6 @@ public async Task TestNoBlankLineAtEndOfFile_1() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -211,7 +207,6 @@ public async Task TestNoBlankLineAtEndOfFile_2() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -229,7 +224,6 @@ public async Task TestOneBlankLineAtEndOfFile() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -323,7 +317,6 @@ public async Task TestNoBlankLineBetweenTokens() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -340,7 +333,6 @@ public async Task TestOneBlankLineBetweenTokens() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -429,7 +421,6 @@ public async Task TestNoBlankLineAfterComment() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -447,7 +438,6 @@ public async Task TestOneBlankLineAfterComment() await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -541,7 +531,6 @@ public async Task TestNoBlankLineAfterDirective() await new Verify.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); @@ -560,7 +549,6 @@ public async Task TestOneBlankLineAfterDirective() await new Verify.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); @@ -659,7 +647,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -678,7 +665,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); } @@ -781,7 +767,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); @@ -805,7 +790,6 @@ class C await new Verify.Test { TestCode = code, - FixedCode = code, LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8, Options = { { CodeStyleOptions2.AllowMultipleBlankLines, CodeStyleOption2.FalseWithSuggestionEnforcement } } }.RunAsync(); diff --git a/src/Analyzers/CSharp/Tests/RemoveUnnecessaryCast/RemoveUnnecessaryCastTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnnecessaryCast/RemoveUnnecessaryCastTests.cs index ca6f3fe43ab08..0c7ae7293a84d 100644 --- a/src/Analyzers/CSharp/Tests/RemoveUnnecessaryCast/RemoveUnnecessaryCastTests.cs +++ b/src/Analyzers/CSharp/Tests/RemoveUnnecessaryCast/RemoveUnnecessaryCastTests.cs @@ -5741,7 +5741,6 @@ void Goo() await new VerifyCS.Test { TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -5766,7 +5765,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -5792,7 +5790,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -5818,7 +5815,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -5910,7 +5906,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -5936,7 +5931,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -5962,7 +5956,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -6064,7 +6057,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -6086,7 +6078,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -6108,7 +6099,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7_1, }.RunAsync(); } @@ -6164,7 +6154,6 @@ void M(string s) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -6188,7 +6177,6 @@ void M(string s) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -8238,7 +8226,6 @@ static int Main() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -8311,7 +8298,6 @@ void M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -8360,7 +8346,6 @@ void M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -8409,7 +8394,6 @@ void M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -8509,7 +8493,6 @@ void M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -8558,7 +8541,6 @@ void M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -8607,7 +8589,6 @@ void M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -9659,7 +9640,6 @@ public class C { var test = new VerifyCS.Test() { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9 }; @@ -9711,7 +9691,6 @@ public class C { var test = new VerifyCS.Test() { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9 }; @@ -9733,7 +9712,6 @@ public class C { var test = new VerifyCS.Test() { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9 }; @@ -9819,7 +9797,6 @@ public static ulong P(ulong a, uint b) var test = new VerifyCS.Test() { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9 }; @@ -9843,7 +9820,6 @@ public static nuint N(nuint a, uint b) var test = new VerifyCS.Test() { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9 }; @@ -9867,7 +9843,6 @@ public static ulong N() var test = new VerifyCS.Test() { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9 }; @@ -10004,7 +9979,6 @@ static void Main() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -10033,7 +10007,6 @@ public E First await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -10057,7 +10030,6 @@ public TestClass(Func value) { } await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -10080,7 +10052,6 @@ unsafe void M(nint** ptr) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -10916,7 +10887,6 @@ void M(object o) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -12120,7 +12090,6 @@ void AddHandler(Delegate handler) { } await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = version, }.RunAsync(); } @@ -12151,7 +12120,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12171,7 +12139,6 @@ class C await new VerifyCS.Test { TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -12189,7 +12156,6 @@ class C await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12214,7 +12180,6 @@ static IEnumerable DoThis(IEnumerable notreallynull) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12237,7 +12202,6 @@ bool M(object obj) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12259,7 +12223,6 @@ public IEnumerable Bar() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12281,7 +12244,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12305,7 +12267,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12328,7 +12289,6 @@ public static void MethodName() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12345,7 +12305,6 @@ static class Program await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12368,7 +12327,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12393,7 +12351,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12413,7 +12370,6 @@ public uint fn1(sbyte a, sbyte b) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12433,7 +12389,6 @@ public void fn1(int start, int end) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12458,7 +12413,6 @@ public Code(DoSomething f) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12482,7 +12436,6 @@ static void CheckRedundantCast() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12514,7 +12467,6 @@ enum Numbers await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12565,7 +12517,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12607,7 +12558,6 @@ void Run() await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12635,7 +12585,6 @@ public X(double d) { } await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12683,7 +12632,6 @@ private C(ReadOnlyMemory? buffer = null) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -12729,7 +12677,6 @@ public unsafe static implicit operator PointerDelegate(delegate*(object o) where T : Delegate await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -13128,7 +13072,6 @@ public enum Test await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/RemoveUnnecessaryLambdaExpression/RemoveUnnecessaryLambdaExpressionTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnnecessaryLambdaExpression/RemoveUnnecessaryLambdaExpressionTests.cs index 7bdc80f506142..6bc07cf4af140 100644 --- a/src/Analyzers/CSharp/Tests/RemoveUnnecessaryLambdaExpression/RemoveUnnecessaryLambdaExpressionTests.cs +++ b/src/Analyzers/CSharp/Tests/RemoveUnnecessaryLambdaExpression/RemoveUnnecessaryLambdaExpressionTests.cs @@ -119,7 +119,6 @@ void Bar(Func f) { } await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp12, Options = { { CSharpCodeStyleOptions.PreferMethodGroupConversion, new CodeStyleOption2(false, NotificationOption2.None) } } }.RunAsync(); diff --git a/src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs index d7ab7dbffa2a7..fbc00d0c64c7e 100644 --- a/src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs +++ b/src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs @@ -438,7 +438,6 @@ public async Task EntryPointMethodNotFlagged_06() await new VerifyCS.Test { TestCode = code, - FixedCode = code, ExpectedDiagnostics = { // /0/Test0.cs(2,1): error CS8805: Program using top-level statements must be an executable. diff --git a/src/Analyzers/CSharp/Tests/RemoveUnusedParametersAndValues/RemoveUnusedValueAssignmentTests.cs b/src/Analyzers/CSharp/Tests/RemoveUnusedParametersAndValues/RemoveUnusedValueAssignmentTests.cs index 7000b894c5edb..48b3eab5b066c 100644 --- a/src/Analyzers/CSharp/Tests/RemoveUnusedParametersAndValues/RemoveUnusedValueAssignmentTests.cs +++ b/src/Analyzers/CSharp/Tests/RemoveUnusedParametersAndValues/RemoveUnusedValueAssignmentTests.cs @@ -65,7 +65,6 @@ int M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, UnusedValuePreference.DiscardVariable, NotificationOption2.None }, @@ -93,7 +92,6 @@ int M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, UnusedValuePreference.DiscardVariable, NotificationOption2.None }, @@ -406,7 +404,6 @@ void M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, UnusedValuePreference.UnusedLocalVariable }, @@ -1317,7 +1314,6 @@ int M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, (UnusedValuePreference)option }, @@ -1401,7 +1397,6 @@ int M(int x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, (UnusedValuePreference)option }, @@ -1525,7 +1520,6 @@ int M(int x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, (UnusedValuePreference)option }, @@ -1555,7 +1549,6 @@ bool M(bool x) await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, (UnusedValuePreference)option }, @@ -1586,7 +1579,6 @@ bool M() await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, (UnusedValuePreference)option }, @@ -10063,7 +10055,6 @@ public void Reset() { await new VerifyCS.Test { TestCode = source, - FixedCode = source, Options = { { CSharpCodeStyleOptions.UnusedValueAssignment, UnusedValuePreference.DiscardVariable }, diff --git a/src/Analyzers/CSharp/Tests/UseCoalesceExpression/UseCoalesceExpressionForIfNullStatementCheckTests.cs b/src/Analyzers/CSharp/Tests/UseCoalesceExpression/UseCoalesceExpressionForIfNullStatementCheckTests.cs index b90c9f295ab96..065c91b83751d 100644 --- a/src/Analyzers/CSharp/Tests/UseCoalesceExpression/UseCoalesceExpressionForIfNullStatementCheckTests.cs +++ b/src/Analyzers/CSharp/Tests/UseCoalesceExpression/UseCoalesceExpressionForIfNullStatementCheckTests.cs @@ -202,7 +202,6 @@ void M(C item1) await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -226,7 +225,6 @@ void M() await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -250,7 +248,6 @@ void M() await new VerifyCS.Test { TestCode = text, - FixedCode = text, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -275,7 +272,6 @@ void M(C item1) await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -301,7 +297,6 @@ void M(C item1) await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -328,7 +323,6 @@ void M(C item1) await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -353,7 +347,6 @@ void M(C item1) await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -383,7 +376,6 @@ void M() await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -407,7 +399,6 @@ void M() await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -431,7 +422,6 @@ void M() await new VerifyCS.Test { TestCode = text, - FixedCode = text, }.RunAsync(); } @@ -455,7 +445,6 @@ void M() await new VerifyCS.Test { TestCode = text, - FixedCode = text, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs b/src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs index 5d9f3f4dcd37c..d70e33ad6cbad 100644 --- a/src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs +++ b/src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs @@ -42,7 +42,6 @@ private static async Task TestMissingInRegularAndScriptAsync(string testCode, La var test = new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, }; if (languageVersion != null) diff --git a/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundAssignmentTests.cs b/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundAssignmentTests.cs index fb61260019e04..ea80f822af76d 100644 --- a/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundAssignmentTests.cs +++ b/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundAssignmentTests.cs @@ -283,7 +283,6 @@ void M(int? a) await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_3 }.RunAsync(); } @@ -305,7 +304,6 @@ void M(int? a) await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp8 }.RunAsync(); } @@ -958,7 +956,6 @@ InsertionPoint Up() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, ReferenceAssemblies = ReferenceAssemblies.Net.Net60 }.RunAsync(); diff --git a/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundCoalesceAssignmentTests.cs b/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundCoalesceAssignmentTests.cs index eb005bef46ee7..ab6bafab2e87b 100644 --- a/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundCoalesceAssignmentTests.cs +++ b/src/Analyzers/CSharp/Tests/UseCompoundAssignment/UseCompoundCoalesceAssignmentTests.cs @@ -33,7 +33,6 @@ private static async Task TestMissingAsync(string testCode, LanguageVersion lang await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = languageVersion, ReferenceAssemblies = ReferenceAssemblies.Net.Net60, }.RunAsync(); diff --git a/src/Analyzers/CSharp/Tests/UseConditionalExpression/UseConditionalExpressionForAssignmentTests.cs b/src/Analyzers/CSharp/Tests/UseConditionalExpression/UseConditionalExpressionForAssignmentTests.cs index 548e764d0a344..03048bdecccd8 100644 --- a/src/Analyzers/CSharp/Tests/UseConditionalExpression/UseConditionalExpressionForAssignmentTests.cs +++ b/src/Analyzers/CSharp/Tests/UseConditionalExpression/UseConditionalExpressionForAssignmentTests.cs @@ -29,7 +29,6 @@ private static async Task TestMissingAsync( var test = new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = languageVersion, Options = { options }, }; diff --git a/src/Analyzers/CSharp/Tests/UseDefaultLiteral/UseDefaultLiteralTests.cs b/src/Analyzers/CSharp/Tests/UseDefaultLiteral/UseDefaultLiteralTests.cs index e7651ba47f906..b5e69a7715a2a 100644 --- a/src/Analyzers/CSharp/Tests/UseDefaultLiteral/UseDefaultLiteralTests.cs +++ b/src/Analyzers/CSharp/Tests/UseDefaultLiteral/UseDefaultLiteralTests.cs @@ -34,7 +34,6 @@ class C await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7 }.RunAsync(); } @@ -134,7 +133,6 @@ string Goo() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -188,7 +186,6 @@ void Goo() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -236,7 +233,6 @@ void Goo() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -257,7 +253,6 @@ void Goo() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -312,7 +307,6 @@ void Bar(int i) { } await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -482,7 +476,6 @@ public override bool Equals(object obj) await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -509,7 +502,6 @@ public override bool Equals(object obj) await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -566,7 +558,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -590,7 +581,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -647,7 +637,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -671,7 +660,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -758,7 +746,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } @@ -779,7 +766,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp7_1 }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.cs b/src/Analyzers/CSharp/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.cs index 7e24bf2ee9a9a..f173c92ce2cd2 100644 --- a/src/Analyzers/CSharp/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.cs +++ b/src/Analyzers/CSharp/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.cs @@ -220,7 +220,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.PreferExplicitTupleNames, false, NotificationOption2.Warning } @@ -245,7 +244,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, Options = { { CodeStyleOptions2.PreferExplicitTupleNames, false, NotificationOption2.Warning } @@ -298,7 +296,6 @@ void M() await new VerifyCS.Test() { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11 }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/UseExpressionBody/UseExpressionBodyForAccessorsAnalyzerTests.cs b/src/Analyzers/CSharp/Tests/UseExpressionBody/UseExpressionBodyForAccessorsAnalyzerTests.cs index c496185cb85d1..de8c9a8781e08 100644 --- a/src/Analyzers/CSharp/Tests/UseExpressionBody/UseExpressionBodyForAccessorsAnalyzerTests.cs +++ b/src/Analyzers/CSharp/Tests/UseExpressionBody/UseExpressionBodyForAccessorsAnalyzerTests.cs @@ -575,7 +575,6 @@ C this[int index] await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.PreferExpressionBodiedAccessors, ExpressionBodyPreference.WhenOnSingleLine, NotificationOption2.None }, diff --git a/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseIndexOperatorTests.cs b/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseIndexOperatorTests.cs index aaa1b12f1e9a8..22027513b98fb 100644 --- a/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseIndexOperatorTests.cs +++ b/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseIndexOperatorTests.cs @@ -38,7 +38,6 @@ void Goo(string s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -243,7 +242,6 @@ void Goo(string s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -265,7 +263,6 @@ void Goo(string s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -288,7 +285,6 @@ void Goo(S s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -379,7 +375,6 @@ void Goo(S s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -402,7 +397,6 @@ void Goo(S s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -493,7 +487,6 @@ void Goo(S s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -516,7 +509,6 @@ void Goo(S s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -538,7 +530,6 @@ void Goo(string[] s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp20, TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -797,7 +788,6 @@ void Goo(Dictionary s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } @@ -822,7 +812,6 @@ void Goo(List s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } } diff --git a/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseRangeOperatorTests.cs b/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseRangeOperatorTests.cs index 1465302c90134..14447543578e5 100644 --- a/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseRangeOperatorTests.cs +++ b/src/Analyzers/CSharp/Tests/UseIndexOrRangeOperator/UseRangeOperatorTests.cs @@ -38,7 +38,6 @@ void Goo(string s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -98,7 +97,6 @@ void Goo(string s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp20, TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -399,7 +397,6 @@ void Goo(string s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -700,7 +697,6 @@ void Goo(S s) { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } [Fact] @@ -1311,7 +1307,6 @@ void M() { ReferenceAssemblies = ReferenceAssemblies.NetCore.NetCoreApp31, TestCode = source, - FixedCode = source, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/UseNullPropagation/UseNullPropagationTests.cs b/src/Analyzers/CSharp/Tests/UseNullPropagation/UseNullPropagationTests.cs index fd23f28af5bf6..7b76c674dd345 100644 --- a/src/Analyzers/CSharp/Tests/UseNullPropagation/UseNullPropagationTests.cs +++ b/src/Analyzers/CSharp/Tests/UseNullPropagation/UseNullPropagationTests.cs @@ -43,7 +43,6 @@ private static async Task TestMissingInRegularAndScriptAsync(string testCode, La await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = languageVersion, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/UseObjectInitializer/UseObjectInitializerTests.cs b/src/Analyzers/CSharp/Tests/UseObjectInitializer/UseObjectInitializerTests.cs index 252322bd3d60e..9dbe9d05342a3 100644 --- a/src/Analyzers/CSharp/Tests/UseObjectInitializer/UseObjectInitializerTests.cs +++ b/src/Analyzers/CSharp/Tests/UseObjectInitializer/UseObjectInitializerTests.cs @@ -25,7 +25,6 @@ private static async Task TestMissingInRegularAndScriptAsync(string testCode, La var test = new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, }; if (languageVersion != null) diff --git a/src/Analyzers/CSharp/Tests/UsePatternMatching/CSharpAsAndMemberAccessTests.cs b/src/Analyzers/CSharp/Tests/UsePatternMatching/CSharpAsAndMemberAccessTests.cs index a8abf3c3d92cc..07fd91862e4ce 100644 --- a/src/Analyzers/CSharp/Tests/UsePatternMatching/CSharpAsAndMemberAccessTests.cs +++ b/src/Analyzers/CSharp/Tests/UsePatternMatching/CSharpAsAndMemberAccessTests.cs @@ -67,7 +67,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -89,7 +88,6 @@ void M(object o, int length) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -109,7 +107,6 @@ void M(object o, int length) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -134,7 +131,6 @@ void M(object o, int length) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp7, }.RunAsync(); } @@ -156,7 +152,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -178,7 +173,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -200,7 +194,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -222,7 +215,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -247,7 +239,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -271,7 +262,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -367,7 +357,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -391,7 +380,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -608,7 +596,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -630,7 +617,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -652,7 +638,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -677,7 +662,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -847,7 +831,6 @@ void M(object o) await new VerifyCS.Test { TestCode = test, - FixedCode = test, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } diff --git a/src/Analyzers/CSharp/Tests/UseTupleSwap/UseTupleSwapTests.cs b/src/Analyzers/CSharp/Tests/UseTupleSwap/UseTupleSwapTests.cs index dd1ac5b1f3dc4..6f7d0c2b76112 100644 --- a/src/Analyzers/CSharp/Tests/UseTupleSwap/UseTupleSwapTests.cs +++ b/src/Analyzers/CSharp/Tests/UseTupleSwap/UseTupleSwapTests.cs @@ -39,7 +39,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp6, }.RunAsync(); } @@ -62,7 +61,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, Options = { { CSharpCodeStyleOptions.PreferTupleSwap, false, CodeStyle.NotificationOption2.Silent } @@ -114,7 +112,6 @@ void M(ref int a, ref int b) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -216,7 +213,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -238,7 +234,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -260,7 +255,6 @@ void M(string[] args, string temp1) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -282,7 +276,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -304,7 +297,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -326,7 +318,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -348,7 +339,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -442,7 +432,6 @@ void M(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -495,7 +484,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -555,7 +543,6 @@ unsafe void M(int* v0, int* v1) await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } } diff --git a/src/EditorFeatures/CSharpTest/CodeActions/GenerateEqualsAndGetHashCodeFromMembers/GenerateEqualsAndGetHashCodeFromMembersTests.cs b/src/EditorFeatures/CSharpTest/CodeActions/GenerateEqualsAndGetHashCodeFromMembers/GenerateEqualsAndGetHashCodeFromMembersTests.cs index 7254e15840547..1b977d47ab288 100644 --- a/src/EditorFeatures/CSharpTest/CodeActions/GenerateEqualsAndGetHashCodeFromMembers/GenerateEqualsAndGetHashCodeFromMembersTests.cs +++ b/src/EditorFeatures/CSharpTest/CodeActions/GenerateEqualsAndGetHashCodeFromMembers/GenerateEqualsAndGetHashCodeFromMembersTests.cs @@ -3969,7 +3969,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } diff --git a/src/EditorFeatures/CSharpTest/CodeActions/InitializeParameter/AddParameterCheckTests.cs b/src/EditorFeatures/CSharpTest/CodeActions/InitializeParameter/AddParameterCheckTests.cs index cf878d73011f8..51e66334cc26d 100644 --- a/src/EditorFeatures/CSharpTest/CodeActions/InitializeParameter/AddParameterCheckTests.cs +++ b/src/EditorFeatures/CSharpTest/CodeActions/InitializeParameter/AddParameterCheckTests.cs @@ -49,8 +49,7 @@ public C([||]string s) await new VerifyCS.Test { LanguageVersion = LanguageVersion.CSharp11, - TestCode = testCode, - FixedCode = testCode + TestCode = testCode }.RunAsync(); } @@ -261,8 +260,7 @@ partial void M(string s) await new VerifyCS.Test { LanguageVersion = languageVersion, - TestCode = code, - FixedCode = code + TestCode = code }.RunAsync(); } @@ -284,8 +282,7 @@ public partial void M(string s) await new VerifyCS.Test { LanguageVersion = LanguageVersion.CSharp9, - TestCode = code, - FixedCode = code + TestCode = code }.RunAsync(); } @@ -309,8 +306,7 @@ partial void M(string s) await new VerifyCS.Test { LanguageVersion = languageVersion, - TestCode = code, - FixedCode = code + TestCode = code }.RunAsync(); } @@ -332,8 +328,7 @@ public partial void M(string s) await new VerifyCS.Test { LanguageVersion = LanguageVersion.CSharp9, - TestCode = code, - FixedCode = code + TestCode = code }.RunAsync(); } @@ -1717,8 +1712,7 @@ public C() await new VerifyCS.Test { LanguageVersion = LanguageVersion.CSharp11, - TestCode = testCode, - FixedCode = testCode + TestCode = testCode }.RunAsync(); } @@ -1831,7 +1825,6 @@ int this[[||]string s] await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -2933,7 +2926,6 @@ record C([||]string s) { public string s; } { LanguageVersion = version, TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -2947,7 +2939,6 @@ class C([||]string s) { public string s; } { LanguageVersion = LanguageVersion.CSharp12, TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -2961,7 +2952,6 @@ struct C([||]string s) { public string s; } { LanguageVersion = LanguageVersion.CSharp12, TestCode = code, - FixedCode = code, }.RunAsync(); } diff --git a/src/EditorFeatures/CSharpTest/CodeActions/MoveStaticMembers/CSharpMoveStaticMembersTests.cs b/src/EditorFeatures/CSharpTest/CodeActions/MoveStaticMembers/CSharpMoveStaticMembersTests.cs index 62a5bf040e58a..356a59d1b690b 100644 --- a/src/EditorFeatures/CSharpTest/CodeActions/MoveStaticMembers/CSharpMoveStaticMembersTests.cs +++ b/src/EditorFeatures/CSharpTest/CodeActions/MoveStaticMembers/CSharpMoveStaticMembersTests.cs @@ -3224,7 +3224,6 @@ public class Class1 await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, }.RunAsync().ConfigureAwait(false); } @@ -3242,7 +3241,6 @@ public class Class1 await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, }.RunAsync().ConfigureAwait(false); } @@ -3260,7 +3258,6 @@ public class Class1 await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, }.RunAsync().ConfigureAwait(false); } @@ -3278,7 +3275,6 @@ public class Class1 await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, }.RunAsync().ConfigureAwait(false); } @@ -3296,7 +3292,6 @@ public class Class1 await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, }.RunAsync().ConfigureAwait(false); } @@ -3389,7 +3384,6 @@ public async Task TestSelectTopLevelStatement_NoAction1() await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp10, TestState = { @@ -3410,7 +3404,6 @@ public async Task TestSelectTopLevelStatement_NoAction2() await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp10, TestState = { @@ -3434,7 +3427,6 @@ public async Task TestSelectTopLevelLocalFunction_NoAction() await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp10, TestState = { @@ -3557,7 +3549,6 @@ private static async Task TestNoRefactoringAsync(string initialMarkup) await new Test("", ImmutableArray.Empty, "") { TestCode = initialMarkup, - FixedCode = initialMarkup, }.RunAsync().ConfigureAwait(false); } } diff --git a/src/Features/CSharpTest/ConvertCast/ConvertDirectCastToTryCastTests.cs b/src/Features/CSharpTest/ConvertCast/ConvertDirectCastToTryCastTests.cs index dcdd2d76d2b55..8347779d25a12 100644 --- a/src/Features/CSharpTest/ConvertCast/ConvertDirectCastToTryCastTests.cs +++ b/src/Features/CSharpTest/ConvertCast/ConvertDirectCastToTryCastTests.cs @@ -103,7 +103,6 @@ public static void Main() await new VerifyCS.Test { TestCode = InitialMarkup, - FixedCode = InitialMarkup, OffersEmptyRefactoring = false, CodeActionValidationMode = CodeActionValidationMode.None, }.RunAsync(); @@ -125,7 +124,6 @@ public void M() where T: struct await new VerifyCS.Test { TestCode = InitialMarkup, - FixedCode = InitialMarkup, OffersEmptyRefactoring = false, CodeActionValidationMode = CodeActionValidationMode.None, }.RunAsync(); @@ -147,7 +145,6 @@ public void M() await new VerifyCS.Test { TestCode = InitialMarkup, - FixedCode = InitialMarkup, OffersEmptyRefactoring = false, CodeActionValidationMode = CodeActionValidationMode.None, }.RunAsync(); diff --git a/src/Features/CSharpTest/ConvertCast/ConvertTryCastToDirectCastTests.cs b/src/Features/CSharpTest/ConvertCast/ConvertTryCastToDirectCastTests.cs index 2edc7508b99c5..3e9cd7af78c82 100644 --- a/src/Features/CSharpTest/ConvertCast/ConvertTryCastToDirectCastTests.cs +++ b/src/Features/CSharpTest/ConvertCast/ConvertTryCastToDirectCastTests.cs @@ -62,7 +62,6 @@ public static void Main() await new VerifyCS.Test { TestCode = InitialMarkup, - FixedCode = InitialMarkup, CompilerDiagnostics = CompilerDiagnostics.None, // CS0077 is present, but we present the refactoring anyway (this may overlap with a diagnostic fixer) OffersEmptyRefactoring = false, CodeActionValidationMode = CodeActionValidationMode.Full, @@ -84,7 +83,6 @@ public static void Main() await new VerifyCS.Test { TestCode = InitialMarkup, - FixedCode = InitialMarkup, CompilerDiagnostics = CompilerDiagnostics.None, OffersEmptyRefactoring = false, CodeActionValidationMode = CodeActionValidationMode.None, diff --git a/src/Features/CSharpTest/ConvertIfToSwitch/ConvertIfToSwitchTests.cs b/src/Features/CSharpTest/ConvertIfToSwitch/ConvertIfToSwitchTests.cs index d16e6a17d6fbd..dd2c121016149 100644 --- a/src/Features/CSharpTest/ConvertIfToSwitch/ConvertIfToSwitchTests.cs +++ b/src/Features/CSharpTest/ConvertIfToSwitch/ConvertIfToSwitchTests.cs @@ -2428,7 +2428,6 @@ void M(int i) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -2498,7 +2497,6 @@ void M(int i) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -2616,7 +2614,6 @@ void M(int i) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp8, }.RunAsync(); } @@ -2886,7 +2883,6 @@ void M(char c) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -2911,7 +2907,6 @@ int M(char c) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -2934,7 +2929,6 @@ void M(char c) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -2957,7 +2951,6 @@ void M(char c) await new VerifyCS.Test { TestCode = source, - FixedCode = source, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } diff --git a/src/Features/CSharpTest/ConvertNamespace/ConvertNamespaceRefactoringTests.cs b/src/Features/CSharpTest/ConvertNamespace/ConvertNamespaceRefactoringTests.cs index 37b1cc83d28ab..fa645a11949f8 100644 --- a/src/Features/CSharpTest/ConvertNamespace/ConvertNamespaceRefactoringTests.cs +++ b/src/Features/CSharpTest/ConvertNamespace/ConvertNamespaceRefactoringTests.cs @@ -36,7 +36,6 @@ namespace $$N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, Options = { @@ -56,7 +55,6 @@ namespace $$N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -119,7 +117,6 @@ namespace N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -139,7 +136,6 @@ namespace N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -163,7 +159,6 @@ namespace N2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -186,7 +181,6 @@ namespace N2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -209,7 +203,6 @@ namespace $$N2 await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -231,7 +224,6 @@ namespace $$N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -253,7 +245,6 @@ namespace $$N await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -623,7 +614,6 @@ namespace $$N; await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -684,7 +674,6 @@ namespace N; await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -703,7 +692,6 @@ namespace N; await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -721,7 +709,6 @@ namespace N; $$ await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { diff --git a/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainAnalyzerTests.cs b/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainAnalyzerTests.cs index 3d57289bb6c0e..929676950bda8 100644 --- a/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainAnalyzerTests.cs +++ b/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainAnalyzerTests.cs @@ -28,7 +28,6 @@ public async Task NotOfferedWhenUserPrefersTopLevelStatements() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, @@ -51,7 +50,6 @@ void M() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false } }, }.RunAsync(); @@ -139,7 +137,6 @@ public async Task NotOfferedInLibrary() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, }.RunAsync(); @@ -155,7 +152,6 @@ public async Task NotOfferedWhenSuppressed() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.None } }, diff --git a/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainRefactoringTests.cs b/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainRefactoringTests.cs index 6688cdae18cea..77cf9e04aaecb 100644 --- a/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainRefactoringTests.cs +++ b/src/Features/CSharpTest/ConvertProgram/ConvertToProgramMainRefactoringTests.cs @@ -31,7 +31,6 @@ class C await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, ExpectedDiagnostics = @@ -51,7 +50,6 @@ public async Task TestNotOnEmptyFile() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, ExpectedDiagnostics = @@ -93,7 +91,6 @@ public async Task TestNotOfferedInLibrary() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -133,7 +130,6 @@ public async Task TestNoConvertToProgramMainWithProgramMainPreferenceSuggestion( await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = @@ -152,7 +148,6 @@ public async Task TestNoConvertToProgramMainWithProgramMainPreferenceSilent() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = diff --git a/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsAnalyzerTests.cs b/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsAnalyzerTests.cs index 90a0ff9dac731..0043e5831dc3a 100644 --- a/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsAnalyzerTests.cs +++ b/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsAnalyzerTests.cs @@ -44,7 +44,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false } }, @@ -67,7 +66,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp8, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, @@ -246,7 +244,6 @@ static void Main() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, }.RunAsync(); @@ -291,7 +288,6 @@ void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -319,7 +315,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -347,7 +342,6 @@ static void Main1(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -372,7 +366,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -394,7 +387,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -417,7 +409,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -440,7 +431,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -467,7 +457,6 @@ partial class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -490,7 +479,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -514,7 +502,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -538,7 +525,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -589,7 +575,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -615,7 +600,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -641,7 +625,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -667,7 +650,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -692,7 +674,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -717,7 +698,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -744,7 +724,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -771,7 +750,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -796,7 +774,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -821,7 +798,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -846,7 +822,6 @@ static void Main(string[] args) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, @@ -869,7 +844,6 @@ static void Main(string[] args1) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, diff --git a/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsRefactoringTests.cs b/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsRefactoringTests.cs index d429d6b707a7d..95721cc2dbbb9 100644 --- a/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsRefactoringTests.cs +++ b/src/Features/CSharpTest/ConvertProgram/ConvertToTopLevelStatementsRefactoringTests.cs @@ -31,7 +31,6 @@ public async Task TestNotOnEmptyFile() await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, ExpectedDiagnostics = @@ -59,7 +58,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, }.RunAsync(); @@ -108,7 +106,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, Options = { @@ -133,7 +130,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = @@ -165,7 +161,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp8, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = @@ -190,7 +185,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = @@ -215,7 +209,6 @@ class Program await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, TestState = { OutputKind = OutputKind.ConsoleApplication }, Options = diff --git a/src/Features/CSharpTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.cs b/src/Features/CSharpTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.cs index cfad68025c998..93af30d6414fe 100644 --- a/src/Features/CSharpTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.cs +++ b/src/Features/CSharpTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.cs @@ -1024,7 +1024,6 @@ class C { LanguageVersion = LanguageVersion.CSharp9, TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -1081,7 +1080,6 @@ void M() { { LanguageVersion = LanguageVersion.CSharp9, TestCode = code, - FixedCode = code, }.RunAsync(); await new VerifyCS.Test diff --git a/src/Features/CSharpTest/EmbeddedLanguages/JsonStringDetectorTests.cs b/src/Features/CSharpTest/EmbeddedLanguages/JsonStringDetectorTests.cs index ace78f9016557..192c6fc3a0e01 100644 --- a/src/Features/CSharpTest/EmbeddedLanguages/JsonStringDetectorTests.cs +++ b/src/Features/CSharpTest/EmbeddedLanguages/JsonStringDetectorTests.cs @@ -118,7 +118,6 @@ void Goo() await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } @@ -137,7 +136,6 @@ void Goo() await new VerifyCS.Test { TestCode = code, - FixedCode = code, }.RunAsync(); } } diff --git a/src/Features/CSharpTest/EnableNullable/EnableNullableTests.cs b/src/Features/CSharpTest/EnableNullable/EnableNullableTests.cs index eee1e1fd5efa7..bcf701a0ec174 100644 --- a/src/Features/CSharpTest/EnableNullable/EnableNullableTests.cs +++ b/src/Features/CSharpTest/EnableNullable/EnableNullableTests.cs @@ -545,7 +545,6 @@ public async Task DisabledIfSetInProject(NullableContextOptions nullableContextO await new VerifyCS.Test { TestCode = code, - FixedCode = code, SolutionTransforms = { (solution, projectId) => diff --git a/src/Features/CSharpTest/ExtractClass/ExtractClassTests.cs b/src/Features/CSharpTest/ExtractClass/ExtractClassTests.cs index 447e92479f21a..53100c1716a75 100644 --- a/src/Features/CSharpTest/ExtractClass/ExtractClassTests.cs +++ b/src/Features/CSharpTest/ExtractClass/ExtractClassTests.cs @@ -115,7 +115,6 @@ class Test : ErrorBase await new Test { TestCode = input, - FixedCode = input, }.RunAsync(); } @@ -135,7 +134,6 @@ class Test await new Test { TestCode = input, - FixedCode = input, WorkspaceKind = WorkspaceKind.MiscellaneousFiles }.RunAsync(); } @@ -432,7 +430,6 @@ record R(string $$S) await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp9, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -450,7 +447,6 @@ class R(string $$S) await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp12, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -466,7 +462,6 @@ class R(string $$S); await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp12, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -484,7 +479,6 @@ struct R(string $$S) await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp12, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -500,7 +494,6 @@ struct R(string $$S); await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp12, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -521,7 +514,6 @@ record struct R(string S) await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp10, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -542,7 +534,6 @@ struct R(string S) await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp12, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -2817,8 +2808,7 @@ class C """; await new Test { - TestCode = input, - FixedCode = input + TestCode = input }.RunAsync(); } @@ -2836,8 +2826,7 @@ class C """; await new Test { - TestCode = input, - FixedCode = input + TestCode = input }.RunAsync(); } @@ -2850,7 +2839,6 @@ public async Task TestTopLevelStatementSelection_NoAction() await new Test { TestCode = input, - FixedCode = input, LanguageVersion = LanguageVersion.CSharp10, TestState = { @@ -2987,8 +2975,7 @@ public void N() { }|] await new Test() { - TestCode = code, - FixedCode = code + TestCode = code }.RunAsync(); } @@ -3009,8 +2996,7 @@ public void N() { } await new Test() { - TestCode = code, - FixedCode = code + TestCode = code }.RunAsync(); } diff --git a/src/Features/CSharpTest/GenerateFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs b/src/Features/CSharpTest/GenerateFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs index 3b5fa7bc1a794..9f908a3862680 100644 --- a/src/Features/CSharpTest/GenerateFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs +++ b/src/Features/CSharpTest/GenerateFromMembers/AddConstructorParametersFromMembers/AddConstructorParametersFromMembersTests.cs @@ -1835,7 +1835,6 @@ public C() await new VerifyCS.Test { TestCode = source, - FixedCode = source, EditorConfig = FieldNamesCamelCaseWithFieldUnderscorePrefixEndUnderscoreSuffixEditorConfig }.RunAsync(); } diff --git a/src/Features/CSharpTest/SimplifyPropertyPattern/SimplifyPropertyPatternTests.cs b/src/Features/CSharpTest/SimplifyPropertyPattern/SimplifyPropertyPatternTests.cs index d9bb2f0109845..3d4befd345afc 100644 --- a/src/Features/CSharpTest/SimplifyPropertyPattern/SimplifyPropertyPatternTests.cs +++ b/src/Features/CSharpTest/SimplifyPropertyPattern/SimplifyPropertyPatternTests.cs @@ -42,7 +42,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp9, }.RunAsync(); } @@ -108,7 +107,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -134,7 +132,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -160,7 +157,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -186,7 +182,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -212,7 +207,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -238,7 +232,6 @@ void S(Type t) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, }.RunAsync(); } @@ -750,7 +743,6 @@ void S(R r) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); @@ -773,7 +765,6 @@ void S(R r) await new VerifyCS.Test { TestCode = testCode, - FixedCode = testCode, LanguageVersion = LanguageVersion.CSharp10, ReferenceAssemblies = ReferenceAssemblies.Net.Net50, }.RunAsync(); diff --git a/src/Features/CSharpTest/UseNameofInAttribute/UseNameofInAttributeTests.cs b/src/Features/CSharpTest/UseNameofInAttribute/UseNameofInAttributeTests.cs index 21e46e4308899..fa81ca0737c9d 100644 --- a/src/Features/CSharpTest/UseNameofInAttribute/UseNameofInAttributeTests.cs +++ b/src/Features/CSharpTest/UseNameofInAttribute/UseNameofInAttributeTests.cs @@ -174,7 +174,6 @@ class C await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp10, ReferenceAssemblies = ReferenceAssemblies.Net.Net60, }.RunAsync(); @@ -196,7 +195,6 @@ class C await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net60, }.RunAsync(); @@ -218,7 +216,6 @@ class C await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net60, }.RunAsync(); @@ -240,7 +237,6 @@ class C await new VerifyCS.Test { TestCode = code, - FixedCode = code, LanguageVersion = LanguageVersion.CSharp11, ReferenceAssemblies = ReferenceAssemblies.Net.Net60, }.RunAsync(); From 5197c8e8f862cf3ba23fdce56e4d42fbc0bc1afe Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 19 Nov 2024 14:06:24 -0800 Subject: [PATCH 2/2] inherit refactoring state --- .../CodeActions/CSharpCodeRefactoringVerifier`1+Test.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeRefactoringVerifier`1+Test.cs b/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeRefactoringVerifier`1+Test.cs index 06dd59037896e..2585055daa8dc 100644 --- a/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeRefactoringVerifier`1+Test.cs +++ b/src/Features/DiagnosticsTestUtilities/CodeActions/CSharpCodeRefactoringVerifier`1+Test.cs @@ -51,6 +51,7 @@ static Test() public Test() { _sharedState = new SharedVerifierState(this, DefaultFileExt); + this.FixedState.InheritanceMode = StateInheritanceMode.AutoInherit; } ///