Browse Source

Update IcoDecoderTests.cs

pull/3069/head
James Jackson-South 7 months ago
parent
commit
128d6f943a
  1. 11
      tests/ImageSharp.Tests/Formats/Icon/Ico/IcoDecoderTests.cs

11
tests/ImageSharp.Tests/Formats/Icon/Ico/IcoDecoderTests.cs

@ -204,12 +204,19 @@ public class IcoDecoderTests
} }
[Theory] [Theory]
[WithFile(InvalidAll, PixelTypes.Rgba32)]
[WithFile(InvalidBpp, PixelTypes.Rgba32)] [WithFile(InvalidBpp, PixelTypes.Rgba32)]
public void InvalidThrows_InvalidImageContentException(TestImageProvider<Rgba32> provider)
=> Assert.Throws<InvalidImageContentException>(() =>
{
using Image<Rgba32> image = provider.GetImage(IcoDecoder.Instance);
});
[Theory]
[WithFile(InvalidAll, PixelTypes.Rgba32)]
[WithFile(InvalidCompression, PixelTypes.Rgba32)] [WithFile(InvalidCompression, PixelTypes.Rgba32)]
[WithFile(InvalidRLE4, PixelTypes.Rgba32)] [WithFile(InvalidRLE4, PixelTypes.Rgba32)]
[WithFile(InvalidRLE8, PixelTypes.Rgba32)] [WithFile(InvalidRLE8, PixelTypes.Rgba32)]
public void InvalidTest(TestImageProvider<Rgba32> provider) public void InvalidThows_NotSupportedException(TestImageProvider<Rgba32> provider)
=> Assert.Throws<NotSupportedException>(() => => Assert.Throws<NotSupportedException>(() =>
{ {
using Image<Rgba32> image = provider.GetImage(IcoDecoder.Instance); using Image<Rgba32> image = provider.GetImage(IcoDecoder.Instance);

Loading…
Cancel
Save