From 24e87b4afa3fcb4e31c4b74d51106cef5e4dae33 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Tue, 15 Aug 2017 14:50:39 +0200 Subject: [PATCH] smaller Bike.png, optimized RotateTests & RotateFlipTests --- .../Processors/Transforms/RotateFlipTests.cs | 3 ++- .../Processing/Processors/Transforms/RotateTests.cs | 11 +++++++---- tests/Images/Input/Png/Bike.png | 4 ++-- tests/Images/Input/Png/BikeGrayscale.png | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs index b6f6a4520..452b39cfc 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs @@ -25,7 +25,8 @@ namespace ImageSharp.Tests.Processing.Processors.Transforms }; [Theory] - [WithFileCollection(nameof(FlipFiles), nameof(RotateFlipValues), DefaultPixelType)] + [WithTestPatternImages(nameof(RotateFlipValues), 100, 50, DefaultPixelType)] + [WithTestPatternImages(nameof(RotateFlipValues), 50, 100, DefaultPixelType)] public void ImageShouldRotateFlip(TestImageProvider provider, RotateType rotateType, FlipType flipType) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs index 7fc864cac..59e88e90b 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs @@ -3,6 +3,7 @@ // Licensed under the Apache License, Version 2.0. // +// ReSharper disable InconsistentNaming namespace ImageSharp.Tests.Processing.Processors.Transforms { using ImageSharp.PixelFormats; @@ -29,8 +30,9 @@ namespace ImageSharp.Tests.Processing.Processors.Transforms }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(RotateFloatValues), DefaultPixelType)] - public void ImageShouldRotate(TestImageProvider provider, float value) + [WithTestPatternImages(nameof(RotateFloatValues), 100, 50, DefaultPixelType)] + [WithTestPatternImages(nameof(RotateFloatValues), 50, 100, DefaultPixelType)] + public void Rotate(TestImageProvider provider, float value) where TPixel : struct, IPixel { using (Image image = provider.GetImage()) @@ -41,8 +43,9 @@ namespace ImageSharp.Tests.Processing.Processors.Transforms } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(RotateEnumValues), DefaultPixelType)] - public void ImageShouldRotateEnum(TestImageProvider provider, RotateType value) + [WithTestPatternImages(nameof(RotateEnumValues), 100, 50, DefaultPixelType)] + [WithTestPatternImages(nameof(RotateEnumValues), 50, 100, DefaultPixelType)] + public void Rotate_WithRotateTypeEnum(TestImageProvider provider, RotateType value) where TPixel : struct, IPixel { using (Image image = provider.GetImage()) diff --git a/tests/Images/Input/Png/Bike.png b/tests/Images/Input/Png/Bike.png index 743c10a01..5d5b2b229 100644 --- a/tests/Images/Input/Png/Bike.png +++ b/tests/Images/Input/Png/Bike.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e23edfeed35f1d5e29ab6429223c788ba8f7da8aba30f1ffd02d6c4b2f3f428 -size 344266 +oid sha256:66188aa1e0b12e35598a3f1d7abf17aaa2a48b66eb030de5a6e7416237420030 +size 292942 diff --git a/tests/Images/Input/Png/BikeGrayscale.png b/tests/Images/Input/Png/BikeGrayscale.png index 652a1af0a..893aff97f 100644 --- a/tests/Images/Input/Png/BikeGrayscale.png +++ b/tests/Images/Input/Png/BikeGrayscale.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4304d42e522e841f870f57fa3cdab38d2f26784ac6eaaa2cbcbc55649be0bd7 -size 98064 +oid sha256:6c1030c7587bcfea910ac3e7e111f30b3c15366ff4e06f9f2fc81865e9d4124d +size 84783