提交 bc394d76 编写于 作者: P Petr Houska

Update InvertIf tests.

上级 8e4dc8b4
......@@ -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()
{
......
......@@ -119,18 +119,24 @@ End Module")
End Module")
End Function
<WorkItem(35525, "https://github.com/dotnet/roslyn/issues/35525")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInvertIf)>
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
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInvertIf)>
......
......@@ -440,14 +440,16 @@ End Module
Await TestMissingAsync(markup)
End Function
<WorkItem(35525, "https://github.com/dotnet/roslyn/issues/35525")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInvertIf)>
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
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInvertIf)>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册