mirror of https://github.com/SixLabors/ImageSharp
6 changed files with 93 additions and 17 deletions
@ -0,0 +1,47 @@ |
|||
// ReSharper disable InconsistentNaming
|
|||
namespace ImageSharp.Tests |
|||
{ |
|||
using System; |
|||
|
|||
using ImageSharp.PixelFormats; |
|||
|
|||
using Xunit; |
|||
|
|||
public class TestImageExtensionsTests |
|||
{ |
|||
[Theory] |
|||
[WithSolidFilledImages(10, 10, 0, 0, 255, PixelTypes.Rgba32)] |
|||
public void CompareToReferenceOutput_WhenReferenceOutputMatches_ShouldNotThrow<TPixel>( |
|||
TestImageProvider<TPixel> provider) |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
using (Image<TPixel> image = provider.GetImage()) |
|||
{ |
|||
image.CompareToReferenceOutput(provider); |
|||
} |
|||
} |
|||
|
|||
[Theory] |
|||
[WithSolidFilledImages(10, 10, 0, 0, 255, PixelTypes.Rgba32)] |
|||
public void CompareToReferenceOutput_WhenReferenceOutputDoesNotMatch_Throws<TPixel>( |
|||
TestImageProvider<TPixel> provider) |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
using (Image<TPixel> image = provider.GetImage()) |
|||
{ |
|||
Assert.ThrowsAny<Exception>(() => image.CompareToReferenceOutput(provider)); |
|||
} |
|||
} |
|||
|
|||
[Theory] |
|||
[WithSolidFilledImages(10, 10, 0, 0, 255, PixelTypes.Rgba32)] |
|||
public void CompareToReferenceOutput_WhenReferenceFileMissing_Throws<TPixel>(TestImageProvider<TPixel> provider) |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
using (Image<TPixel> image = provider.GetImage()) |
|||
{ |
|||
Assert.ThrowsAny<Exception>(() => image.CompareToReferenceOutput(provider)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1 +1 @@ |
|||
Subproject commit 8240bdb291e3476c4e50fef6fe2fccfe4fbd10c4 |
|||
Subproject commit ec2161042fe9addeff10fab73b0a3d71172b86a8 |
|||
Loading…
Reference in new issue