Browse Source

Use CompareToReferenceOutput for failing bmp tests on linux

pull/3096/head
Brian Popow 1 month ago
parent
commit
802e275e8e
  1. 19
      tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
  2. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_issue735.png
  3. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb16-565.png
  4. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb16-565pal.png
  5. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb16bfdef.png
  6. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb32bf.png
  7. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb32bfdef.png
  8. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_16Bit_Inverted_Rgba32_test16-inverted.png
  9. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta_Rgba32_pal4rlecut.png
  10. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta_Rgba32_pal4rletrns.png
  11. 3
      tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta_Rgba32_rle4-delta-320x240.png

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

@ -91,13 +91,22 @@ public class BmpDecoderTests
{
using Image<TPixel> image = provider.GetImage(BmpDecoder.Instance);
image.DebugSave(provider);
image.CompareToOriginal(provider);
image.CompareToReferenceOutput(provider);
}
[Theory]
[WithFile(Bit16Inverted, PixelTypes.Rgba32)]
public void BmpDecoder_CanDecode_16Bit_Inverted<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(BmpDecoder.Instance);
image.DebugSave(provider);
image.CompareToReferenceOutput(provider);
}
[Theory]
[WithFile(Bit8Inverted, PixelTypes.Rgba32)]
public void BmpDecoder_CanDecode_Inverted<TPixel>(TestImageProvider<TPixel> provider)
public void BmpDecoder_CanDecode_8Bit_Inverted<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(BmpDecoder.Instance);
@ -156,7 +165,7 @@ public class BmpDecoderTests
{
using Image<TPixel> image = provider.GetImage(BmpDecoder.Instance);
image.DebugSave(provider);
image.CompareToOriginal(provider);
image.CompareToOriginal(provider, new SystemDrawingReferenceDecoder(BmpFormat.Instance));
}
[Theory]
@ -186,12 +195,12 @@ public class BmpDecoderTests
public void BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
RleSkippedPixelHandling skippedPixelHandling = TestEnvironment.IsWindows ? RleSkippedPixelHandling.Black : RleSkippedPixelHandling.FirstColorOfPalette;
RleSkippedPixelHandling skippedPixelHandling = RleSkippedPixelHandling.Black;
BmpDecoderOptions options = new() { RleSkippedPixelHandling = skippedPixelHandling };
using Image<TPixel> image = provider.GetImage(BmpDecoder.Instance, options);
image.DebugSave(provider);
image.CompareToOriginal(provider);
image.CompareToReferenceOutput(provider);
}
[Theory]

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_issue735.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15de93db72e2de0ad1a21b67931df57c1a129f062fe1ed3cb7f083761af4fe36
size 61931

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb16-565.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7a568f9f12adc5606e5b74d25a4bf083e2b565d73635704e205400d5a073fcd3
size 9895

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb16-565pal.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7a568f9f12adc5606e5b74d25a4bf083e2b565d73635704e205400d5a073fcd3
size 9895

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb16bfdef.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c05e0b14a389d11f531d4238900106a81f25a741a55bbbcd160b8b67eb32adb6
size 7019

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb32bf.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d577ac117b8260ad08e6f051c949d9187f04699eed0f063476aaf42eada2366
size 20640

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecodeBitfields_Rgba32_rgb32bfdef.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d577ac117b8260ad08e6f051c949d9187f04699eed0f063476aaf42eada2366
size 20640

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_16Bit_Inverted_Rgba32_test16-inverted.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53a33da2c1a84c0e8426e1a2ba24e2fe2de17a7bc75760184fb10bf6dc96954a
size 7896

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta_Rgba32_pal4rlecut.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f0c97446dec6af009423dcae431c44d23963179c3c3bfbeaf3f3b52022a33f68
size 2414

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta_Rgba32_pal4rletrns.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a651b81764696cd4fe42113d5ac26006f54820d2df8b2103793e82c66597b2b0
size 2837

3
tests/Images/External/ReferenceOutput/BmpDecoderTests/BmpDecoder_CanDecode_RunLengthEncoded_4Bit_WithDelta_Rgba32_rle4-delta-320x240.png

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55672d405a3d085c72cfc9fb26bc3955bf858e525c54c6c4505f093f011f378d
size 3188
Loading…
Cancel
Save