Enabled windows-only tests on all plattforms

They are now also supported on Linux because we are using SkiaSharp instead of System.Drawing.Common
This commit is contained in:
Dimitri Vranken 2023-02-13 12:09:35 +01:00
parent f95bba5aa2
commit bdfe87be16
2 changed files with 24 additions and 24 deletions

View file

@ -1,5 +1,4 @@
using System.Runtime.InteropServices; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FFMpegCore.Test.Utilities; namespace FFMpegCore.Test.Utilities;
@ -7,16 +6,17 @@ public class WindowsOnlyDataTestMethod : DataTestMethodAttribute
{ {
public override TestResult[] Execute(ITestMethod testMethod) public override TestResult[] Execute(ITestMethod testMethod)
{ {
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // Commented out because this edition of FFMpegCore fully supports Linux
{ //if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
var message = $"Test not executed on other platforms than Windows"; //{
{ // var message = $"Test not executed on other platforms than Windows";
return new[] // {
{ // return new[]
new TestResult { Outcome = UnitTestOutcome.Inconclusive, TestFailureException = new AssertInconclusiveException(message) } // {
}; // new TestResult { Outcome = UnitTestOutcome.Inconclusive, TestFailureException = new AssertInconclusiveException(message) }
} // };
} // }
//}
return base.Execute(testMethod); return base.Execute(testMethod);
} }

View file

@ -1,5 +1,4 @@
using System.Runtime.InteropServices; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FFMpegCore.Test.Utilities; namespace FFMpegCore.Test.Utilities;
@ -7,16 +6,17 @@ public class WindowsOnlyTestMethod : TestMethodAttribute
{ {
public override TestResult[] Execute(ITestMethod testMethod) public override TestResult[] Execute(ITestMethod testMethod)
{ {
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // Commented out because this edition of FFMpegCore fully supports Linux
{ //if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
var message = $"Test not executed on other platforms than Windows"; //{
{ // var message = $"Test not executed on other platforms than Windows";
return new[] // {
{ // return new[]
new TestResult { Outcome = UnitTestOutcome.Inconclusive, TestFailureException = new AssertInconclusiveException(message) } // {
}; // new TestResult { Outcome = UnitTestOutcome.Inconclusive, TestFailureException = new AssertInconclusiveException(message) }
} // };
} // }
//}
return base.Execute(testMethod); return base.Execute(testMethod);
} }