Browse Source

fix BokehBlurFilterProcessor_Bounded

pull/1659/head
Anton Firszov 5 years ago
parent
commit
488b486d3e
  1. 9
      tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs

9
tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs

@ -11,6 +11,7 @@ using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing; using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Processors.Convolution; using SixLabors.ImageSharp.Processing.Processors.Convolution;
using SixLabors.ImageSharp.Tests.TestUtilities; using SixLabors.ImageSharp.Tests.TestUtilities;
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
@ -154,8 +155,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
appendSourceFileOrDescription: false); appendSourceFileOrDescription: false);
[Theory] [Theory]
[WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32)] [WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32, HwIntrinsics.AllowAll)]
public void BokehBlurFilterProcessor_Bounded(TestImageProvider<Rgba32> provider, BokehBlurInfo value) [WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32, HwIntrinsics.DisableSSE41)]
public void BokehBlurFilterProcessor_Bounded(TestImageProvider<Rgba32> provider, BokehBlurInfo value, HwIntrinsics intrinsicsFilter)
{ {
static void RunTest(string arg1, string arg2) static void RunTest(string arg1, string arg2)
{ {
@ -173,12 +175,13 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds); x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds);
}, },
testOutputDetails: value.ToString(), testOutputDetails: value.ToString(),
ImageComparer.TolerantPercentage(0.05f),
appendPixelTypeToFileName: false); appendPixelTypeToFileName: false);
} }
FeatureTestRunner.RunWithHwIntrinsicsFeature( FeatureTestRunner.RunWithHwIntrinsicsFeature(
RunTest, RunTest,
HwIntrinsics.DisableSSE41, intrinsicsFilter,
provider, provider,
value); value);
} }

Loading…
Cancel
Save