diff --git a/src/EditorFeatures/CSharpTest/InvertIf/InvertIfTests.cs b/src/EditorFeatures/CSharpTest/InvertIf/InvertIfTests.cs index 367c0c0a9b61e3fb9d2b9c9e14ad1e77fe18fa7d..ed91ce4a09902406e701c2b0fc6dd46188f999fe 100644 --- a/src/EditorFeatures/CSharpTest/InvertIf/InvertIfTests.cs +++ b/src/EditorFeatures/CSharpTest/InvertIf/InvertIfTests.cs @@ -719,26 +719,6 @@ void Goo() }"); } - [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInvertIf)] - public async Task TestMissingOnNonEmptySpan() - { - await TestMissingInRegularAndScriptAsync( -@"class C -{ - void F() - { - [|if (a) - { - a(); - } - else - { - b(); - }|] - } -}"); - } - [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInvertIf)] public async Task TestOverlapsHiddenPosition1() { diff --git a/src/EditorFeatures/VisualBasicTest/InvertIf/InvertMultiLineIfTests.vb b/src/EditorFeatures/VisualBasicTest/InvertIf/InvertMultiLineIfTests.vb index e9d9aee9ebaea1e421348dac3b283b9598773788..816d56bf1b76884b860b16f0cf004f0f9f15f48b 100644 --- a/src/EditorFeatures/VisualBasicTest/InvertIf/InvertMultiLineIfTests.vb +++ b/src/EditorFeatures/VisualBasicTest/InvertIf/InvertMultiLineIfTests.vb @@ -119,18 +119,24 @@ End Module") End Module") End Function + - Public Async Function TestMissingOnNonEmptySpan() As Task - Await TestMissingInRegularAndScriptAsync( -"Module Program - Sub Main() + Public Async Function TestSelection() As Task + Await TestFixOneAsync( +" [|If a Then aMethod() Else bMethod() End If|] - End Sub -End Module") +", +" + If Not a Then + bMethod() + Else + aMethod() + End If +") End Function diff --git a/src/EditorFeatures/VisualBasicTest/InvertIf/InvertSingleLineIfTests.vb b/src/EditorFeatures/VisualBasicTest/InvertIf/InvertSingleLineIfTests.vb index e17c70d649e6de3ce56a4420e8d2b97b8e5bac63..b924752f56ee51a1eaf2769a7c54f2dc02714eea 100644 --- a/src/EditorFeatures/VisualBasicTest/InvertIf/InvertSingleLineIfTests.vb +++ b/src/EditorFeatures/VisualBasicTest/InvertIf/InvertSingleLineIfTests.vb @@ -440,14 +440,16 @@ End Module Await TestMissingAsync(markup) End Function + - Public Async Function TestMissingOnNonEmptyTextSpan() As Task - Await TestMissingInRegularAndScriptAsync( -"Module Program - Sub Main() - [|If a Th|]en aMethod() Else bMethod() - End Sub -End Module") + Public Async Function TestSelection() As Task + Await TestFixOneAsync( +" + [|If a And b Then aMethod() Else bMethod()|] +", +" + If Not a Or Not b Then bMethod() Else aMethod() +") End Function