From a665bce50e370effd28ec92ee34e15c5d2dd78dd Mon Sep 17 00:00:00 2001 From: Evangelink Date: Tue, 24 Nov 2020 15:55:59 +0100 Subject: [PATCH] Update integration tests --- .../Processing/Processors/Transforms/SwizzleTests.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs index b951a7fb0..4d3b60494 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs @@ -13,7 +13,12 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms { private struct InvertXAndYSwizzler : ISwizzler { - public Size DestinationSize => new Size(10, 10); + public InvertXAndYSwizzler(Size sourceSize) + { + this.DestinationSize = new Size(sourceSize.Height, sourceSize.Width); + } + + public Size DestinationSize { get; } public void Transform(Point point, out Point newPoint) => newPoint = new Point(point.Y, point.X); @@ -26,8 +31,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms public void InvertXAndYSwizzle(TestImageProvider provider) where TPixel : unmanaged, IPixel { + Image image = provider.GetImage(); provider.RunValidatingProcessorTest( - ctx => ctx.Swizzle(default(InvertXAndYSwizzler)), + ctx => ctx.Swizzle(new InvertXAndYSwizzler(new Size(image.Width, image.Height))), testOutputDetails: nameof(InvertXAndYSwizzler), appendPixelTypeToFileName: false); }