提交 8c067991 编写于 作者: J Jan Hindermann

Add tests

上级 88480367
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Test.Utilities; using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Xunit; using Xunit;
using static Microsoft.CodeAnalysis.Editor.UnitTests.Classification.FormattedClassifications; using static Microsoft.CodeAnalysis.Editor.UnitTests.Classification.FormattedClassifications;
...@@ -837,6 +838,20 @@ public async Task PP_PragmaWarningDisableOneWithComment() ...@@ -837,6 +838,20 @@ public async Task PP_PragmaWarningDisableOneWithComment()
Comment("//Goo")); Comment("//Goo"));
} }
[Fact, Trait(Traits.Feature, Traits.Features.Classification)]
[WorkItem(30783, "https://github.com/dotnet/roslyn/issues/30783")]
public async Task PP_PragmaWarningDisableAllWithComment()
{
var code = @"#pragma warning disable //Goo";
await TestAsync(code,
PPKeyword("#"),
PPKeyword("pragma"),
PPKeyword("warning"),
PPKeyword("disable"),
Comment("//Goo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.Classification)] [Fact, Trait(Traits.Feature, Traits.Features.Classification)]
public async Task PP_PragmaWarningRestoreOne() public async Task PP_PragmaWarningRestoreOne()
{ {
...@@ -864,6 +879,20 @@ public async Task PP_PragmaWarningRestoreOneWithComment() ...@@ -864,6 +879,20 @@ public async Task PP_PragmaWarningRestoreOneWithComment()
Comment("//Goo")); Comment("//Goo"));
} }
[Fact, Trait(Traits.Feature, Traits.Features.Classification)]
[WorkItem(30783, "https://github.com/dotnet/roslyn/issues/30783")]
public async Task PP_PragmaWarningRestoreAllWithComment()
{
var code = @"#pragma warning restore //Goo";
await TestAsync(code,
PPKeyword("#"),
PPKeyword("pragma"),
PPKeyword("warning"),
PPKeyword("restore"),
Comment("//Goo"));
}
[Fact, Trait(Traits.Feature, Traits.Features.Classification)] [Fact, Trait(Traits.Feature, Traits.Features.Classification)]
public async Task PP_PragmaWarningDisableTwo() public async Task PP_PragmaWarningDisableTwo()
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册