Browse Source

smaller Bike.png, optimized RotateTests & RotateFlipTests

af/merge-core
Anton Firszov 9 years ago
parent
commit
24e87b4afa
  1. 3
      tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs
  2. 11
      tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs
  3. 4
      tests/Images/Input/Png/Bike.png
  4. 4
      tests/Images/Input/Png/BikeGrayscale.png

3
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<TPixel>(TestImageProvider<TPixel> provider, RotateType rotateType, FlipType flipType)
where TPixel : struct, IPixel<TPixel>
{

11
tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs

@ -3,6 +3,7 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
// 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<TPixel>(TestImageProvider<TPixel> provider, float value)
[WithTestPatternImages(nameof(RotateFloatValues), 100, 50, DefaultPixelType)]
[WithTestPatternImages(nameof(RotateFloatValues), 50, 100, DefaultPixelType)]
public void Rotate<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{
using (Image<TPixel> image = provider.GetImage())
@ -41,8 +43,9 @@ namespace ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), nameof(RotateEnumValues), DefaultPixelType)]
public void ImageShouldRotateEnum<TPixel>(TestImageProvider<TPixel> provider, RotateType value)
[WithTestPatternImages(nameof(RotateEnumValues), 100, 50, DefaultPixelType)]
[WithTestPatternImages(nameof(RotateEnumValues), 50, 100, DefaultPixelType)]
public void Rotate_WithRotateTypeEnum<TPixel>(TestImageProvider<TPixel> provider, RotateType value)
where TPixel : struct, IPixel<TPixel>
{
using (Image<TPixel> image = provider.GetImage())

4
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

4
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

Loading…
Cancel
Save