未验证 提交 ea6be25a 编写于 作者: J Julien Couvreur 提交者: GitHub

Verify formatting of #nullable (#31241)

上级 19b50a45
......@@ -11,6 +11,34 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Formatting
{
public class FormattingEngineTriviaTests : CSharpFormattingTestBase
{
[Fact, Trait(Traits.Feature, Traits.Features.Formatting)]
[WorkItem(31130, "https://github.com/dotnet/roslyn/issues/31130")]
public async Task PreprocessorNullable()
{
var content = @"
#nullable
class C
{
#nullable enable
void Method()
{
#nullable disable
}
}";
var expected = @"
#nullable
class C
{
#nullable enable
void Method()
{
#nullable disable
}
}";
await AssertFormatAsync(expected, content);
}
[Fact, Trait(Traits.Feature, Traits.Features.Formatting)]
public async Task PreprocessorInEmptyFile()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册