Skip to content

Commit 5f3bb97

Browse files
committed
Update integration tests
1 parent d16149a commit 5f3bb97

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ public class SwizzleTests
1313
{
1414
private struct InvertXAndYSwizzler : ISwizzler
1515
{
16-
public Size DestinationSize => new Size(10, 10);
16+
public InvertXAndYSwizzler(Size sourceSize)
17+
{
18+
this.DestinationSize = new Size(sourceSize.Height, sourceSize.Width);
19+
}
20+
21+
public Size DestinationSize { get; }
1722

1823
public void Transform(Point point, out Point newPoint)
1924
=> newPoint = new Point(point.Y, point.X);
@@ -26,8 +31,9 @@ public void Transform(Point point, out Point newPoint)
2631
public void InvertXAndYSwizzle<TPixel>(TestImageProvider<TPixel> provider)
2732
where TPixel : unmanaged, IPixel<TPixel>
2833
{
34+
Image<TPixel> image = provider.GetImage();
2935
provider.RunValidatingProcessorTest(
30-
ctx => ctx.Swizzle(default(InvertXAndYSwizzler)),
36+
ctx => ctx.Swizzle(new InvertXAndYSwizzler(new Size(image.Width, image.Height))),
3137
testOutputDetails: nameof(InvertXAndYSwizzler),
3238
appendPixelTypeToFileName: false);
3339
}

0 commit comments

Comments
 (0)