Browse Source

Skip limited buffer bitmap test on NETFX

js/color-alpha-handling
James Jackson-South 5 years ago
parent
commit
586f2dca75
  1. 30
      tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

30
tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

@ -39,22 +39,34 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp
};
[Theory]
[WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32, false)]
[WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32, true)]
public void BmpDecoder_CanDecode_MiscellaneousBitmaps<TPixel>(TestImageProvider<TPixel> provider, bool enforceDiscontiguousBuffers)
[WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32)]
public void BmpDecoder_CanDecode_MiscellaneousBitmaps<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(BmpDecoder);
image.DebugSave(provider);
if (TestEnvironment.IsWindows)
{
image.CompareToOriginal(provider);
}
}
[ActiveIssue("https://github.com/dotnet/arcade/issues/6393", TargetFrameworkMonikers.NetFramework)]
[Theory]
[WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32)]
public void BmpDecoder_CanDecode_MiscellaneousBitmaps_WithLimitedAllocatorBufferCapacity<TPixel>(
TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
TestImageProvider<TPixel> provider = BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump);
if (!string.IsNullOrEmpty(nonContiguousBuffersStr))
{
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
}
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
using Image<TPixel> image = provider.GetImage(BmpDecoder);
image.DebugSave(provider, testOutputDetails: nonContiguousBuffersStr);
image.DebugSave(provider, nonContiguousBuffersStr);
if (TestEnvironment.IsWindows)
{
@ -66,7 +78,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp
RemoteExecutor.Invoke(
RunTest,
providerDump,
enforceDiscontiguousBuffers ? "Disco" : string.Empty)
"Disco")
.Dispose();
}

Loading…
Cancel
Save