Browse Source

Change WithTestPatternImageAttribute to WithTestPatternImagesAttribute

af/octree-no-pixelmap
Brian Popow 6 years ago
parent
commit
51230a776f
  1. 10
      tests/ImageSharp.Tests/Advanced/AdvancedImageExtensionsTests.cs
  2. 8
      tests/ImageSharp.Tests/Drawing/DrawImageTests.cs
  3. 10
      tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
  4. 2
      tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
  5. 12
      tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs
  6. 44
      tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
  7. 4
      tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs
  8. 8
      tests/ImageSharp.Tests/Image/ImageCloneTests.cs
  9. 4
      tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.Generic.cs
  10. 4
      tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs
  11. 4
      tests/ImageSharp.Tests/Processing/Normalization/HistogramEqualizationTests.cs
  12. 4
      tests/ImageSharp.Tests/Processing/Processors/Binarization/BinaryDitherTests.cs
  13. 8
      tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
  14. 2
      tests/ImageSharp.Tests/Processing/Processors/Convolution/DetectEdgesTest.cs
  15. 2
      tests/ImageSharp.Tests/Processing/Processors/Effects/OilPaintTest.cs
  16. 2
      tests/ImageSharp.Tests/Processing/Processors/Effects/PixelateTest.cs
  17. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/BlackWhiteTest.cs
  18. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/BrightnessTest.cs
  19. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/ColorBlindnessTest.cs
  20. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/ContrastTest.cs
  21. 4
      tests/ImageSharp.Tests/Processing/Processors/Filters/FilterTest.cs
  22. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/GrayscaleTest.cs
  23. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/HueTest.cs
  24. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/InvertTest.cs
  25. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/KodachromeTest.cs
  26. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/LightnessTest.cs
  27. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/LomographTest.cs
  28. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/OpacityTest.cs
  29. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/PolaroidTest.cs
  30. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/SaturateTest.cs
  31. 2
      tests/ImageSharp.Tests/Processing/Processors/Filters/SepiaTest.cs
  32. 4
      tests/ImageSharp.Tests/Processing/Processors/Transforms/CropTest.cs
  33. 10
      tests/ImageSharp.Tests/Processing/Processors/Transforms/FlipTests.cs
  34. 40
      tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs
  35. 4
      tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs
  36. 8
      tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateTests.cs
  37. 2
      tests/ImageSharp.Tests/Processing/Processors/Transforms/SkewTests.cs
  38. 10
      tests/ImageSharp.Tests/Processing/Transforms/AffineTransformTests.cs
  39. 2
      tests/ImageSharp.Tests/Processing/Transforms/ProjectiveTransformTests.cs
  40. 6
      tests/ImageSharp.Tests/TestUtilities/Attributes/WithTestPatternImagesAttribute.cs
  41. 18
      tests/ImageSharp.Tests/TestUtilities/Tests/ImageComparerTests.cs
  42. 8
      tests/ImageSharp.Tests/TestUtilities/Tests/SystemDrawingReferenceCodecTests.cs
  43. 4
      tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs

10
tests/ImageSharp.Tests/Advanced/AdvancedImageExtensionsTests.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Tests.Advanced
{
[Theory]
[WithSolidFilledImages(1, 1, "Red", PixelTypes.Rgba32)]
[WithTestPatternImage(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImages(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
public void WhenMemoryIsOwned<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -38,7 +38,7 @@ namespace SixLabors.ImageSharp.Tests.Advanced
[Theory]
[WithSolidFilledImages(1, 1, "Red", PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImage(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImages(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
public void WhenMemoryIsConsumed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -64,7 +64,7 @@ namespace SixLabors.ImageSharp.Tests.Advanced
[Theory]
[WithSolidFilledImages(1, 1, "Red", PixelTypes.Rgba32)]
[WithTestPatternImage(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImages(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
public void GetPixelRowMemory<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -87,7 +87,7 @@ namespace SixLabors.ImageSharp.Tests.Advanced
[Theory]
[WithSolidFilledImages(1, 1, "Red", PixelTypes.Rgba32)]
[WithTestPatternImage(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImages(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
public void GetPixelRowSpan<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -111,7 +111,7 @@ namespace SixLabors.ImageSharp.Tests.Advanced
#pragma warning disable 0618
[Theory]
[WithTestPatternImage(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImages(131, 127, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
public unsafe void DangerousGetPinnableReference_CopyToBuffer<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

8
tests/ImageSharp.Tests/Drawing/DrawImageTests.cs

@ -57,9 +57,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing
[WithFile(TestImages.Png.CalliphoraPartial, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Normal, 0.75f)]
[WithFile(TestImages.Png.CalliphoraPartial, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Normal, 0.25f)]
[WithTestPatternImage(400, 400, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Multiply, 0.5f)]
[WithTestPatternImage(400, 400, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Add, 0.5f)]
[WithTestPatternImage(400, 400, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Subtract, 0.5f)]
[WithTestPatternImages(400, 400, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Multiply, 0.5f)]
[WithTestPatternImages(400, 400, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Add, 0.5f)]
[WithTestPatternImages(400, 400, PixelTypes.Rgba32, TestImages.Png.Splash, PixelColorBlendingMode.Subtract, 0.5f)]
[WithFile(TestImages.Png.Rgb48Bpp, PixelTypes.Rgba64, TestImages.Png.Splash, PixelColorBlendingMode.Normal, 1f)]
[WithFile(TestImages.Png.Rgb48Bpp, PixelTypes.Rgba64, TestImages.Png.Splash, PixelColorBlendingMode.Normal, 0.25f)]
@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
}
[Theory]
[WithTestPatternImage(200, 200, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
[WithTestPatternImages(200, 200, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
public void DrawImageOfDifferentPixelType<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

10
tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs

@ -85,16 +85,16 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp
}
[Theory]
[WithTestPatternImage(nameof(BitsPerPixel), 24, 24, PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.Rgb24)]
[WithTestPatternImages(nameof(BitsPerPixel), 24, 24, PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.Rgb24)]
public void Encode_IsNotBoundToSinglePixelType<TPixel>(TestImageProvider<TPixel> provider, BmpBitsPerPixel bitsPerPixel)
where TPixel : struct, IPixel<TPixel> => TestBmpEncoderCore(provider, bitsPerPixel);
[Theory]
[WithTestPatternImage(nameof(BitsPerPixel), 48, 24, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel), 47, 8, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel), 49, 7, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel), 48, 24, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel), 47, 8, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel), 49, 7, PixelTypes.Rgba32)]
[WithSolidFilledImages(nameof(BitsPerPixel), 1, 1, 255, 100, 50, 255, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel), 7, 5, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel), 7, 5, PixelTypes.Rgba32)]
public void Encode_WorksWithDifferentSizes<TPixel>(TestImageProvider<TPixel> provider, BmpBitsPerPixel bitsPerPixel)
where TPixel : struct, IPixel<TPixel> => TestBmpEncoderCore(provider, bitsPerPixel);

2
tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs

@ -26,7 +26,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Gif
};
[Theory]
[WithTestPatternImage(100, 100, TestPixelTypes)]
[WithTestPatternImages(100, 100, TestPixelTypes)]
public void EncodeGeneratedPatterns<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

12
tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs

@ -59,17 +59,17 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
[Theory]
[WithFile(TestImages.Png.CalliphoraPartial, nameof(BitsPerPixel_Quality), PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel_Quality), 73, 71, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel_Quality), 48, 24, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel_Quality), 46, 8, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel_Quality), 51, 7, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel_Quality), 73, 71, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel_Quality), 48, 24, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel_Quality), 46, 8, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel_Quality), 51, 7, PixelTypes.Rgba32)]
[WithSolidFilledImages(nameof(BitsPerPixel_Quality), 1, 1, 255, 100, 50, 255, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BitsPerPixel_Quality), 7, 5, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BitsPerPixel_Quality), 7, 5, PixelTypes.Rgba32)]
public void EncodeBaseline_WorksWithDifferentSizes<TPixel>(TestImageProvider<TPixel> provider, JpegSubsample subsample, int quality)
where TPixel : struct, IPixel<TPixel> => TestJpegEncoderCore(provider, subsample, quality);
[Theory]
[WithTestPatternImage(nameof(BitsPerPixel_Quality), 48, 48, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
[WithTestPatternImages(nameof(BitsPerPixel_Quality), 48, 48, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
public void EncodeBaseline_IsNotBoundToSinglePixelType<TPixel>(TestImageProvider<TPixel> provider, JpegSubsample subsample, int quality)
where TPixel : struct, IPixel<TPixel> => TestJpegEncoderCore(provider, subsample, quality);

44
tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs

@ -92,11 +92,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
[Theory]
[WithFile(TestImages.Png.Palette8Bpp, nameof(PngColorTypes), PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(PngColorTypes), 48, 24, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(PngColorTypes), 47, 8, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(PngColorTypes), 49, 7, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(PngColorTypes), 48, 24, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(PngColorTypes), 47, 8, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(PngColorTypes), 49, 7, PixelTypes.Rgba32)]
[WithSolidFilledImages(nameof(PngColorTypes), 1, 1, 255, 100, 50, 255, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(PngColorTypes), 7, 5, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(PngColorTypes), 7, 5, PixelTypes.Rgba32)]
public void WorksWithDifferentSizes<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType)
where TPixel : struct, IPixel<TPixel>
{
@ -110,7 +110,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
}
[Theory]
[WithTestPatternImage(nameof(PngColorTypes), 24, 24, PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.Rgb24)]
[WithTestPatternImages(nameof(PngColorTypes), 24, 24, PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.Rgb24)]
public void IsNotBoundToSinglePixelType<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType)
where TPixel : struct, IPixel<TPixel>
{
@ -128,7 +128,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
}
[Theory]
[WithTestPatternImage(nameof(PngFilterMethods), 24, 24, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(PngFilterMethods), 24, 24, PixelTypes.Rgba32)]
public void WorksWithAllFilterMethods<TPixel>(TestImageProvider<TPixel> provider, PngFilterMethod pngFilterMethod)
where TPixel : struct, IPixel<TPixel>
{
@ -145,7 +145,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
}
[Theory]
[WithTestPatternImage(nameof(CompressionLevels), 24, 24, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(CompressionLevels), 24, 24, PixelTypes.Rgba32)]
public void WorksWithAllCompressionLevels<TPixel>(TestImageProvider<TPixel> provider, int compressionLevel)
where TPixel : struct, IPixel<TPixel>
{
@ -163,21 +163,21 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
}
[Theory]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Rgb, PngBitDepth.Bit8)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba64, PngColorType.Rgb, PngBitDepth.Bit16)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.RgbWithAlpha, PngBitDepth.Bit8)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba64, PngColorType.RgbWithAlpha, PngBitDepth.Bit16)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit1)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit2)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit4)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit8)]
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit1)]
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit2)]
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit4)]
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit8)]
[WithTestPatternImage(24, 24, PixelTypes.Rgb48, PngColorType.Grayscale, PngBitDepth.Bit16)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit8)]
[WithTestPatternImage(24, 24, PixelTypes.Rgba64, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit16)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Rgb, PngBitDepth.Bit8)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.Rgb, PngBitDepth.Bit16)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.RgbWithAlpha, PngBitDepth.Bit8)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.RgbWithAlpha, PngBitDepth.Bit16)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit1)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit2)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit4)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit8)]
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit1)]
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit2)]
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit4)]
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit8)]
[WithTestPatternImages(24, 24, PixelTypes.Rgb48, PngColorType.Grayscale, PngBitDepth.Bit16)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit8)]
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit16)]
public void WorksWithAllBitDepths<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType, PngBitDepth pngBitDepth)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
public class PngSmokeTests
{
[Theory]
[WithTestPatternImage(300, 300, PixelTypes.Rgba32)]
[WithTestPatternImages(300, 300, PixelTypes.Rgba32)]
public void GeneralTest<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -95,7 +95,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
}*/
[Theory]
[WithTestPatternImage(300, 300, PixelTypes.Rgba32)]
[WithTestPatternImages(300, 300, PixelTypes.Rgba32)]
public void Resize<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

8
tests/ImageSharp.Tests/Image/ImageCloneTests.cs

@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(9, 9, PixelTypes.Rgba32)]
[WithTestPatternImages(9, 9, PixelTypes.Rgba32)]
public void CloneAs_ToBgra32(TestImageProvider<Rgba32> provider)
{
using Image<Rgba32> image = provider.GetImage();
@ -53,7 +53,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(9, 9, PixelTypes.Rgba32)]
[WithTestPatternImages(9, 9, PixelTypes.Rgba32)]
public void CloneAs_ToBgr24(TestImageProvider<Rgba32> provider)
{
using Image<Rgba32> image = provider.GetImage();
@ -76,7 +76,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(9, 9, PixelTypes.Rgba32)]
[WithTestPatternImages(9, 9, PixelTypes.Rgba32)]
public void CloneAs_ToArgb32(TestImageProvider<Rgba32> provider)
{
using Image<Rgba32> image = provider.GetImage();
@ -100,7 +100,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(9, 9, PixelTypes.Rgba32)]
[WithTestPatternImages(9, 9, PixelTypes.Rgba32)]
public void CloneAs_ToRgb24(TestImageProvider<Rgba32> provider)
{
using Image<Rgba32> image = provider.GetImage();

4
tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.Generic.cs

@ -188,7 +188,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(10, 10, PixelTypes.Rgba32)]
[WithTestPatternImages(10, 10, PixelTypes.Rgba32)]
public void CloneFrame<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -200,7 +200,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(10, 10, PixelTypes.Rgba32)]
[WithTestPatternImages(10, 10, PixelTypes.Rgba32)]
public void ExtractFrame<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Image/ImageFrameCollectionTests.NonGeneric.cs

@ -144,7 +144,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(10, 10, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
[WithTestPatternImages(10, 10, PixelTypes.Rgba32 | PixelTypes.Bgr24)]
public void CloneFrame<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -161,7 +161,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(10, 10, PixelTypes.Rgba32)]
[WithTestPatternImages(10, 10, PixelTypes.Rgba32)]
public void ExtractFrame<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Processing/Normalization/HistogramEqualizationTests.cs

@ -116,8 +116,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Normalization
/// </summary>
/// <typeparam name="TPixel">The pixel type of the image.</typeparam>
[Theory]
[WithTestPatternImage(110, 110, PixelTypes.Rgb24)]
[WithTestPatternImage(170, 170, PixelTypes.Rgb24)]
[WithTestPatternImages(110, 110, PixelTypes.Rgb24)]
[WithTestPatternImages(170, 170, PixelTypes.Rgb24)]
public void Issue984<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Processing/Processors/Binarization/BinaryDitherTests.cs

@ -47,7 +47,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Binarization
[Theory]
[WithFileCollection(nameof(CommonTestImages), nameof(OrderedDitherers), PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(OrderedDitherers), 100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(OrderedDitherers), 100, 100, PixelTypes.Rgba32)]
public void BinaryDitherFilter_WorksWithAllDitherers<TPixel>(TestImageProvider<TPixel> provider, string name, IOrderedDither ditherer)
where TPixel : struct, IPixel<TPixel>
{
@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Binarization
[Theory]
[WithFileCollection(nameof(CommonTestImages), nameof(ErrorDiffusers), PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(ErrorDiffusers), 100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(ErrorDiffusers), 100, 100, PixelTypes.Rgba32)]
public void DiffusionFilter_WorksWithAllErrorDiffusers<TPixel>(TestImageProvider<TPixel> provider, string name, IErrorDiffuser diffuser)
where TPixel : struct, IPixel<TPixel>
{

8
tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs

@ -114,9 +114,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
[Theory]
[WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32)]
[WithSolidFilledImages(nameof(BokehBlurValues), 50, 50, "Red", PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BokehBlurValues), 200, 100, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BokehBlurValues), 23, 31, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(BokehBlurValues), 30, 20, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BokehBlurValues), 200, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BokehBlurValues), 23, 31, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BokehBlurValues), 30, 20, PixelTypes.Rgba32)]
public void BokehBlurFilterProcessor<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value)
where TPixel : struct, IPixel<TPixel>
{
@ -131,7 +131,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
TODO: Re-enable L8 when we update the reference images.
[WithTestPatternImages(200, 200, PixelTypes.Bgr24 | PixelTypes.Bgra32 | PixelTypes.L8)]
*/
[WithTestPatternImage(200, 200, PixelTypes.Bgr24 | PixelTypes.Bgra32)]
[WithTestPatternImages(200, 200, PixelTypes.Bgr24 | PixelTypes.Bgra32)]
public void BokehBlurFilterProcessor_WorksWithAllPixelTypes<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Convolution/DetectEdgesTest.cs

@ -51,7 +51,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
}
[Theory]
[WithTestPatternImage(nameof(DetectEdgesFilters), 100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(DetectEdgesFilters), 100, 100, PixelTypes.Rgba32)]
[WithFileCollection(nameof(TestImages), nameof(DetectEdgesFilters), PixelTypes.Rgba32)]
public void DetectEdges_WorksWithAllFilters<TPixel>(TestImageProvider<TPixel> provider, EdgeDetectionOperators detector)
where TPixel : struct, IPixel<TPixel>

2
tests/ImageSharp.Tests/Processing/Processors/Effects/OilPaintTest.cs

@ -36,7 +36,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
[Theory]
[WithFileCollection(nameof(InputImages), nameof(OilPaintValues), PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(OilPaintValues), 100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(OilPaintValues), 100, 100, PixelTypes.Rgba32)]
public void InBox<TPixel>(TestImageProvider<TPixel> provider, int levels, int brushSize)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Effects/PixelateTest.cs

@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
}
[Theory]
[WithTestPatternImage(nameof(PixelateValues), 320, 240, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(PixelateValues), 320, 240, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.CalliphoraPartial, nameof(PixelateValues), PixelTypes.Rgba32)]
public void InBox<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>

2
tests/ImageSharp.Tests/Processing/Processors/Filters/BlackWhiteTest.cs

@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
public class BlackWhiteTest
{
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplyBlackWhiteFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/BrightnessTest.cs

@ -23,7 +23,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
};
[Theory]
[WithTestPatternImage(nameof(BrightnessValues), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(BrightnessValues), 48, 48, PixelTypes.Rgba32)]
public void ApplyBrightnessFilter<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel> => provider.RunValidatingProcessorTest(ctx => ctx.Brightness(value), value, this.imageComparer);
}

2
tests/ImageSharp.Tests/Processing/Processors/Filters/ColorBlindnessTest.cs

@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
};
[Theory]
[WithTestPatternImage(nameof(ColorBlindnessFilters), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(ColorBlindnessFilters), 48, 48, PixelTypes.Rgba32)]
public void ApplyColorBlindnessFilter<TPixel>(TestImageProvider<TPixel> provider, ColorBlindnessMode colorBlindness)
where TPixel : struct, IPixel<TPixel> => provider.RunValidatingProcessorTest(x => x.ColorBlindness(colorBlindness), colorBlindness.ToString(), this.imageComparer);
}

2
tests/ImageSharp.Tests/Processing/Processors/Filters/ContrastTest.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
};
[Theory]
[WithTestPatternImage(nameof(ContrastValues), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(ContrastValues), 48, 48, PixelTypes.Rgba32)]
public void ApplyContrastFilter<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Processing/Processors/Filters/FilterTest.cs

@ -18,7 +18,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
// Testing the generic FilterProcessor with more than one pixel type intentionally.
// There is no need to do this with the specialized ones.
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
public void ApplyFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -28,7 +28,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
}
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplyFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/GrayscaleTest.cs

@ -24,7 +24,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
/// </summary>
/// <typeparam name="TPixel">The pixel type of the image.</typeparam>
[Theory]
[WithTestPatternImage(nameof(GrayscaleModeTypes), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(GrayscaleModeTypes), 48, 48, PixelTypes.Rgba32)]
public void ApplyGrayscaleFilter<TPixel>(TestImageProvider<TPixel> provider, GrayscaleMode value)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/HueTest.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
};
[Theory]
[WithTestPatternImage(nameof(HueValues), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(HueValues), 48, 48, PixelTypes.Rgba32)]
public void ApplyHueFilter<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/InvertTest.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
public class InvertTest
{
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplyInvertFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/KodachromeTest.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
public class KodachromeTest
{
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplyKodachromeFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/LightnessTest.cs

@ -23,7 +23,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
};
[Theory]
[WithTestPatternImage(nameof(LightnessValues), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(LightnessValues), 48, 48, PixelTypes.Rgba32)]
public void ApplyLightnessFilter<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel> => provider.RunValidatingProcessorTest(ctx => ctx.Lightness(value), value, this.imageComparer);
}

2
tests/ImageSharp.Tests/Processing/Processors/Filters/LomographTest.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
public class LomographTest
{
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplyLomographFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/OpacityTest.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Effects
};
[Theory]
[WithTestPatternImage(nameof(AlphaValues), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(AlphaValues), 48, 48, PixelTypes.Rgba32)]
public void ApplyAlphaFilter<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/PolaroidTest.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
public class PolaroidTest
{
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplyPolaroidFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/SaturateTest.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
};
[Theory]
[WithTestPatternImage(nameof(SaturationValues), 48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(SaturationValues), 48, 48, PixelTypes.Rgba32)]
public void ApplySaturationFilter<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Filters/SepiaTest.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Filters
public class SepiaTest
{
[Theory]
[WithTestPatternImage(48, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(48, 48, PixelTypes.Rgba32)]
public void ApplySepiaFilter<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Processing/Processors/Transforms/CropTest.cs

@ -15,8 +15,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
public class CropTest
{
[Theory]
[WithTestPatternImage(70, 30, PixelTypes.Rgba32, 0, 0, 70, 30)]
[WithTestPatternImage(30, 70, PixelTypes.Rgba32, 7, 13, 20, 50)]
[WithTestPatternImages(70, 30, PixelTypes.Rgba32, 0, 0, 70, 30)]
[WithTestPatternImages(30, 70, PixelTypes.Rgba32, 7, 13, 20, 50)]
public void Crop<TPixel>(TestImageProvider<TPixel> provider, int x, int y, int w, int h)
where TPixel : struct, IPixel<TPixel>
{

10
tests/ImageSharp.Tests/Processing/Processors/Transforms/FlipTests.cs

@ -21,9 +21,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
};
[Theory]
[WithTestPatternImage(nameof(FlipValues), 20, 37, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(FlipValues), 53, 37, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(FlipValues), 17, 32, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(FlipValues), 20, 37, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(FlipValues), 53, 37, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(FlipValues), 17, 32, PixelTypes.Rgba32)]
public void Flip<TPixel>(TestImageProvider<TPixel> provider, FlipMode flipMode)
where TPixel : struct, IPixel<TPixel>
{
@ -34,8 +34,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithTestPatternImage(nameof(FlipValues), 53, 37, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(FlipValues), 17, 32, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(FlipValues), 53, 37, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(FlipValues), 17, 32, PixelTypes.Rgba32)]
public void Flip_WorksOnWrappedMemoryImage<TPixel>(TestImageProvider<TPixel> provider, FlipMode flipMode)
where TPixel : struct, IPixel<TPixel>
{

40
tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs

@ -54,9 +54,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory(Skip = "Debug only, enable manually")]
[WithTestPatternImage(4000, 4000, PixelTypes.Rgba32, 300, 1024)]
[WithTestPatternImage(3032, 3032, PixelTypes.Rgba32, 400, 1024)]
[WithTestPatternImage(3032, 3032, PixelTypes.Rgba32, 400, 128)]
[WithTestPatternImages(4000, 4000, PixelTypes.Rgba32, 300, 1024)]
[WithTestPatternImages(3032, 3032, PixelTypes.Rgba32, 400, 1024)]
[WithTestPatternImages(3032, 3032, PixelTypes.Rgba32, 400, 128)]
public void LargeImage<TPixel>(TestImageProvider<TPixel> provider, int destSize, int workingBufferSizeHintInKilobytes)
where TPixel : struct, IPixel<TPixel>
{
@ -94,13 +94,13 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
private static readonly int SizeOfVector4 = Unsafe.SizeOf<Vector4>();
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32, 50)]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32, 60)]
[WithTestPatternImage(100, 400, PixelTypes.Rgba32, 110)]
[WithTestPatternImage(79, 97, PixelTypes.Rgba32, 73)]
[WithTestPatternImage(79, 97, PixelTypes.Rgba32, 5)]
[WithTestPatternImage(47, 193, PixelTypes.Rgba32, 73)]
[WithTestPatternImage(23, 211, PixelTypes.Rgba32, 31)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 50)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 60)]
[WithTestPatternImages(100, 400, PixelTypes.Rgba32, 110)]
[WithTestPatternImages(79, 97, PixelTypes.Rgba32, 73)]
[WithTestPatternImages(79, 97, PixelTypes.Rgba32, 5)]
[WithTestPatternImages(47, 193, PixelTypes.Rgba32, 73)]
[WithTestPatternImages(23, 211, PixelTypes.Rgba32, 31)]
public void WorkingBufferSizeHintInBytes_IsAppliedCorrectly<TPixel>(
TestImageProvider<TPixel> provider,
int workingBufferLimitInRows)
@ -146,7 +146,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithTestPatternImage(100, 100, DefaultPixelType)]
[WithTestPatternImages(100, 100, DefaultPixelType)]
public void Resize_Compand<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -185,7 +185,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithTestPatternImage(50, 50, CommonNonDefaultPixelTypes)]
[WithTestPatternImages(50, 50, CommonNonDefaultPixelTypes)]
public void Resize_IsNotBoundToSinglePixelType<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -243,12 +243,12 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
1.8f,
null,
null)]
[WithTestPatternImage(nameof(SmokeTestResamplerNames), 100, 100, DefaultPixelType, 0.5f, null, null)]
[WithTestPatternImage(nameof(SmokeTestResamplerNames), 100, 100, DefaultPixelType, 1f, null, null)]
[WithTestPatternImage(nameof(SmokeTestResamplerNames), 50, 50, DefaultPixelType, 8f, null, null)]
[WithTestPatternImage(nameof(SmokeTestResamplerNames), 201, 199, DefaultPixelType, null, 100, 99)]
[WithTestPatternImage(nameof(SmokeTestResamplerNames), 301, 1180, DefaultPixelType, null, 300, 480)]
[WithTestPatternImage(nameof(SmokeTestResamplerNames), 49, 80, DefaultPixelType, null, 301, 100)]
[WithTestPatternImages(nameof(SmokeTestResamplerNames), 100, 100, DefaultPixelType, 0.5f, null, null)]
[WithTestPatternImages(nameof(SmokeTestResamplerNames), 100, 100, DefaultPixelType, 1f, null, null)]
[WithTestPatternImages(nameof(SmokeTestResamplerNames), 50, 50, DefaultPixelType, 8f, null, null)]
[WithTestPatternImages(nameof(SmokeTestResamplerNames), 201, 199, DefaultPixelType, null, 100, 99)]
[WithTestPatternImages(nameof(SmokeTestResamplerNames), 301, 1180, DefaultPixelType, null, 300, 480)]
[WithTestPatternImages(nameof(SmokeTestResamplerNames), 49, 80, DefaultPixelType, null, 301, 100)]
public void Resize_WorksWithAllResamplers<TPixel>(
TestImageProvider<TPixel> provider,
string samplerName,
@ -343,7 +343,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithTestPatternImage(10, 100, DefaultPixelType)]
[WithTestPatternImages(10, 100, DefaultPixelType)]
public void ResizeHeightCannotKeepAspectKeepsOnePixel<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -366,7 +366,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithTestPatternImage(100, 10, DefaultPixelType)]
[WithTestPatternImages(100, 10, DefaultPixelType)]
public void ResizeWidthCannotKeepAspectKeepsOnePixel<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/Processing/Processors/Transforms/RotateFlipTests.cs

@ -24,8 +24,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
};
[Theory]
[WithTestPatternImage(nameof(RotateFlipValues), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(RotateFlipValues), 50, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(RotateFlipValues), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(RotateFlipValues), 50, 100, PixelTypes.Rgba32)]
public void RotateFlip<TPixel>(TestImageProvider<TPixel> provider, RotateMode rotateType, FlipMode flipType)
where TPixel : struct, IPixel<TPixel>
{

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

@ -26,8 +26,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
};
[Theory]
[WithTestPatternImage(nameof(RotateAngles), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(RotateAngles), 50, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(RotateAngles), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(RotateAngles), 50, 100, PixelTypes.Rgba32)]
public void Rotate_WithAngle<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{
@ -35,8 +35,8 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
}
[Theory]
[WithTestPatternImage(nameof(RotateEnumValues), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImage(nameof(RotateEnumValues), 50, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(RotateEnumValues), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(RotateEnumValues), 50, 100, PixelTypes.Rgba32)]
public void Rotate_WithRotateTypeEnum<TPixel>(TestImageProvider<TPixel> provider, RotateMode value)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Processors/Transforms/SkewTests.cs

@ -43,7 +43,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
private static readonly ImageComparer ValidatorComparer = ImageComparer.TolerantPercentage(0.01f);
[Theory]
[WithTestPatternImage(nameof(SkewValues), 100, 50, CommonPixelTypes)]
[WithTestPatternImages(nameof(SkewValues), 100, 50, CommonPixelTypes)]
public void Skew_IsNotBoundToSinglePixelType<TPixel>(TestImageProvider<TPixel> provider, float x, float y)
where TPixel : struct, IPixel<TPixel>
{

10
tests/ImageSharp.Tests/Processing/Transforms/AffineTransformTests.cs

@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms
}
[Theory]
[WithTestPatternImage(nameof(TransformValues), 100, 50, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(TransformValues), 100, 50, PixelTypes.Rgba32)]
public void Transform_RotateScaleTranslate<TPixel>(
TestImageProvider<TPixel> provider,
float angleDeg,
@ -118,7 +118,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms
}
[Theory]
[WithTestPatternImage(96, 96, PixelTypes.Rgba32, 50, 0.8f)]
[WithTestPatternImages(96, 96, PixelTypes.Rgba32, 50, 0.8f)]
public void Transform_RotateScale_ManuallyCentered<TPixel>(TestImageProvider<TPixel> provider, float angleDeg, float s)
where TPixel : struct, IPixel<TPixel>
{
@ -150,7 +150,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms
/// </summary>
/// <typeparam name="TPixel">The pixel type of the image.</typeparam>
[Theory]
[WithTestPatternImage(96, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(96, 48, PixelTypes.Rgba32)]
public void Transform_FromSourceRectangle1<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -168,7 +168,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms
}
[Theory]
[WithTestPatternImage(96, 48, PixelTypes.Rgba32)]
[WithTestPatternImages(96, 48, PixelTypes.Rgba32)]
public void Transform_FromSourceRectangle2<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -185,7 +185,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms
}
[Theory]
[WithTestPatternImage(nameof(ResamplerNames), 150, 150, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(ResamplerNames), 150, 150, PixelTypes.Rgba32)]
public void Transform_WithSampler<TPixel>(TestImageProvider<TPixel> provider, string resamplerName)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Processing/Transforms/ProjectiveTransformTests.cs

@ -59,7 +59,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Transforms
public ProjectiveTransformTests(ITestOutputHelper output) => this.Output = output;
[Theory]
[WithTestPatternImage(nameof(ResamplerNames), 150, 150, PixelTypes.Rgba32)]
[WithTestPatternImages(nameof(ResamplerNames), 150, 150, PixelTypes.Rgba32)]
public void Transform_WithSampler<TPixel>(TestImageProvider<TPixel> provider, string resamplerName)
where TPixel : struct, IPixel<TPixel>
{

6
tests/ImageSharp.Tests/TestUtilities/Attributes/WithTestPatternImageAttribute.cs → tests/ImageSharp.Tests/TestUtilities/Attributes/WithTestPatternImagesAttribute.cs

@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Tests
/// Triggers passing <see cref="TestImageProvider{TPixel}"/> instances which produce a blank image of size width * height.
/// One <see cref="TestImageProvider{TPixel}"/> instance will be passed for each the pixel format defined by the pixelTypes parameter
/// </summary>
public class WithTestPatternImageAttribute : ImageDataAttributeBase
public class WithTestPatternImagesAttribute : ImageDataAttributeBase
{
/// <summary>
/// Triggers passing an <see cref="TestImageProvider{TPixel}"/> that produces a test pattern image of size width * height
@ -19,7 +19,7 @@ namespace SixLabors.ImageSharp.Tests
/// <param name="height">The required height</param>
/// <param name="pixelTypes">The requested parameter</param>
/// <param name="additionalParameters">Additional theory parameter values</param>
public WithTestPatternImageAttribute(int width, int height, PixelTypes pixelTypes, params object[] additionalParameters)
public WithTestPatternImagesAttribute(int width, int height, PixelTypes pixelTypes, params object[] additionalParameters)
: this(null, width, height, pixelTypes, additionalParameters)
{
}
@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.Tests
/// <param name="height">The required height</param>
/// <param name="pixelTypes">The requested parameter</param>
/// <param name="additionalParameters">Additional theory parameter values</param>
public WithTestPatternImageAttribute(string memberData, int width, int height, PixelTypes pixelTypes, params object[] additionalParameters)
public WithTestPatternImagesAttribute(string memberData, int width, int height, PixelTypes pixelTypes, params object[] additionalParameters)
: base(memberData, pixelTypes, additionalParameters)
{
this.Width = width;

18
tests/ImageSharp.Tests/TestUtilities/Tests/ImageComparerTests.cs

@ -25,8 +25,8 @@ namespace SixLabors.ImageSharp.Tests
private ITestOutputHelper Output { get; }
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32, 0.0001f, 1)]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32, 0, 0)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 0.0001f, 1)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 0, 0)]
public void TolerantImageComparer_ApprovesPerfectSimilarity<TPixel>(
TestImageProvider<TPixel> provider,
float imageThreshold,
@ -40,7 +40,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(110, 110, PixelTypes.Rgba32)]
[WithTestPatternImages(110, 110, PixelTypes.Rgba32)]
public void TolerantImageComparer_ApprovesSimilarityBelowTolerance<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -53,7 +53,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32)]
public void TolerantImageComparer_DoesNotApproveSimilarityAboveTolerance<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -72,7 +72,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba64)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba64)]
public void TolerantImageComparer_TestPerPixelThreshold<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -87,8 +87,8 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32, 99, 100)]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32, 100, 99)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 99, 100)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32, 100, 99)]
public void VerifySimilarity_ThrowsOnSizeMismatch<TPixel>(TestImageProvider<TPixel> provider, int w, int h)
where TPixel : struct, IPixel<TPixel>
{
@ -119,7 +119,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32)]
public void ExactComparer_ApprovesExactEquality<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -133,7 +133,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32)]
public void ExactComparer_DoesNotTolerateAnyPixelDifference<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

8
tests/ImageSharp.Tests/TestUtilities/Tests/SystemDrawingReferenceCodecTests.cs

@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
}
[Theory]
[WithTestPatternImage(20, 20, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
[WithTestPatternImages(20, 20, PixelTypes.Rgba32 | PixelTypes.Bgra32)]
public void To32bppArgbSystemDrawingBitmap<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgba32)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32)]
public void From32bppArgbSystemDrawingBitmap2<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -77,7 +77,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
}
[Theory]
[WithTestPatternImage(100, 100, PixelTypes.Rgb24)]
[WithTestPatternImages(100, 100, PixelTypes.Rgb24)]
public void From24bppRgbSystemDrawingBitmap<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -101,7 +101,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests
}
[Theory]
[WithTestPatternImage(20, 20, PixelTypes.Rgba32 | PixelTypes.Argb32)]
[WithTestPatternImages(20, 20, PixelTypes.Rgba32 | PixelTypes.Argb32)]
public void SaveWithReferenceEncoder<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs

@ -300,7 +300,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(49, 20, PixelTypes.Rgba32)]
[WithTestPatternImages(49, 20, PixelTypes.Rgba32)]
public void Use_WithTestPatternImages<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -311,7 +311,7 @@ namespace SixLabors.ImageSharp.Tests
}
[Theory]
[WithTestPatternImage(20, 20, PixelTypes.Rgba32)]
[WithTestPatternImages(20, 20, PixelTypes.Rgba32)]
public void Use_WithTestPatternImages_CustomConfiguration<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

Loading…
Cancel
Save