Skip to content

Commit

Permalink
use windows only attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarolf committed Dec 17, 2020
1 parent 8e8bc64 commit fd67909
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Testing;
using Test.Utilities;
using Xunit;
using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier<
Microsoft.NetCore.Analyzers.Security.UseDefaultDllImportSearchPathsAttribute,
Expand Down Expand Up @@ -523,7 +524,7 @@ public void TestMethod()
}

// [DllImport] is set with an absolute path, which will let the [DefaultDllImportSearchPaths] be ignored.
[Fact(Skip = "user32.dll isn't available on linux")]
[WindowsOnlyFact]
public async Task Test_DllImportAttributeWithAbsolutePath_DefaultDllImportSearchPaths_NoDiagnostic()
{
await VerifyCS.VerifyAnalyzerAsync(@"
Expand All @@ -544,7 +545,7 @@ public void TestMethod()
}

// [DllImport] is set with an absolute path.
[Fact(Skip = "user32.dll isn't available on linux")]
[WindowsOnlyFact]
public async Task Test_DllImportAttributeWithAbsolutePath_NoDiagnostic()
{
await VerifyCS.VerifyAnalyzerAsync(@"
Expand All @@ -563,7 +564,7 @@ public void TestMethod()
}");
}

[Fact(Skip = "user32.dll isn't available on linux")]
[WindowsOnlyFact]
public async Task Test_UsingNonexistentAbsolutePath_NoDiagnostic()
{
await VerifyCS.VerifyAnalyzerAsync(@"
Expand Down

0 comments on commit fd67909

Please sign in to comment.