提交 2947fd3c 编写于 作者: C Cyrus Najmabadi

Update existing test

上级 6054ad86
......@@ -631,7 +631,7 @@ int M(int i)
}
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsConvertSwitchStatementToExpression)]
[WorkItemAttribute(36086, "https://github.com/dotnet/roslyn/issues/36086")]
[WorkItem(36086, "https://github.com/dotnet/roslyn/issues/36086")]
public async Task TestSeverity()
{
var source =
......@@ -655,10 +655,11 @@ int M(int i)
var warningOption = new CodeStyleOption<bool>(true, NotificationOption.Warning);
var options = Option(CSharpCodeStyleOptions.PreferSwitchExpression, warningOption);
var testParameters = new TestParameters(options: options, parseOptions: TestOptions.Regular8);
using var workspace = CreateWorkspaceFromOptions(source, testParameters);
var diags = await GetDiagnosticsAsync(workspace, testParameters);
Assert.Single(diags);
Assert.Equal(DiagnosticSeverity.Warning, diags.First().Severity);
var diag = (await GetDiagnosticsAsync(workspace, testParameters)).Single();
Assert.Equal(DiagnosticSeverity.Warning, diag.Severity);
Assert.Equal(IDEDiagnosticIds.ConvertSwitchStatementToExpressionDiagnosticId, diag.Id);
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册