Browse Source

Change test expectations due to exception change

pull/1574/head
Brian Popow 6 years ago
parent
commit
0bbdb46551
  1. 2
      tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
  2. 2
      tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
  3. 2
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
  4. 2
      tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
  5. 2
      tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs

2
tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

@ -77,7 +77,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp
where TPixel : unmanaged, IPixel<TPixel>
{
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(10);
ImageFormatException ex = Assert.Throws<ImageFormatException>(() => provider.GetImage(BmpDecoder));
InvalidImageContentException ex = Assert.Throws<InvalidImageContentException>(() => provider.GetImage(BmpDecoder));
Assert.IsType<InvalidMemoryOperationException>(ex.InnerException);
}

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

@ -179,7 +179,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Gif
where TPixel : unmanaged, IPixel<TPixel>
{
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(10);
ImageFormatException ex = Assert.Throws<ImageFormatException>(() => provider.GetImage(GifDecoder));
InvalidImageContentException ex = Assert.Throws<InvalidImageContentException>(() => provider.GetImage(GifDecoder));
Assert.IsType<InvalidMemoryOperationException>(ex.InnerException);
}

2
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs

@ -107,7 +107,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
where TPixel : unmanaged, IPixel<TPixel>
{
provider.LimitAllocatorBufferCapacity().InBytesSqrt(10);
ImageFormatException ex = Assert.Throws<ImageFormatException>(() => provider.GetImage(JpegDecoder));
InvalidImageContentException ex = Assert.Throws<InvalidImageContentException>(() => provider.GetImage(JpegDecoder));
this.Output.WriteLine(ex.Message);
Assert.IsType<InvalidMemoryOperationException>(ex.InnerException);
}

2
tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

@ -397,7 +397,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
where TPixel : unmanaged, IPixel<TPixel>
{
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(10);
ImageFormatException ex = Assert.Throws<ImageFormatException>(() => provider.GetImage(PngDecoder));
InvalidImageContentException ex = Assert.Throws<InvalidImageContentException>(() => provider.GetImage(PngDecoder));
Assert.IsType<InvalidMemoryOperationException>(ex.InnerException);
}

2
tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs

@ -740,7 +740,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga
where TPixel : unmanaged, IPixel<TPixel>
{
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(10);
ImageFormatException ex = Assert.Throws<ImageFormatException>(() => provider.GetImage(TgaDecoder));
InvalidImageContentException ex = Assert.Throws<InvalidImageContentException>(() => provider.GetImage(TgaDecoder));
Assert.IsType<InvalidMemoryOperationException>(ex.InnerException);
}

Loading…
Cancel
Save