Browse Source

Fix Argb32 naming in typehelpers.

pull/180/head
James Jackson-South 9 years ago
parent
commit
3b9079020d
  1. 2
      tests/ImageSharp.Tests/Colors/PackedPixelTests.cs
  2. 4
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
  3. 4
      tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs
  4. 4
      tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs
  5. 2
      tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs
  6. 6
      tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs
  7. 4
      tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs

2
tests/ImageSharp.Tests/Colors/PackedPixelTests.cs

@ -62,7 +62,7 @@ namespace ImageSharp.Tests.Colors
} }
[Fact] [Fact]
public void Argb() public void Argb32()
{ {
// Test the limits. // Test the limits.
Assert.Equal((uint)0x0, new Argb32(Vector4.Zero).PackedValue); Assert.Equal((uint)0x0, new Argb32(Vector4.Zero).PackedValue);

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

@ -25,7 +25,7 @@ namespace ImageSharp.Tests
public static string[] ProgressiveTestJpegs = TestImages.Jpeg.Progressive.All; public static string[] ProgressiveTestJpegs = TestImages.Jpeg.Progressive.All;
[Theory] [Theory]
[WithFileCollection(nameof(BaselineTestJpegs), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb)] [WithFileCollection(nameof(BaselineTestJpegs), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb32)]
public void OpenBaselineJpeg_SaveBmp<TColor>(TestImageProvider<TColor> provider) public void OpenBaselineJpeg_SaveBmp<TColor>(TestImageProvider<TColor> provider)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {
@ -36,7 +36,7 @@ namespace ImageSharp.Tests
} }
[Theory] [Theory]
[WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb)] [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb32)]
public void OpenProgressiveJpeg_SaveBmp<TColor>(TestImageProvider<TColor> provider) public void OpenProgressiveJpeg_SaveBmp<TColor>(TestImageProvider<TColor> provider)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {

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

@ -48,8 +48,8 @@ namespace ImageSharp.Tests
} }
[Theory] [Theory]
[WithFileCollection(nameof(AllBmpFiles), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb, JpegSubsample.Ratio420, 75)] [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb32, JpegSubsample.Ratio420, 75)]
[WithFileCollection(nameof(AllBmpFiles), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb, JpegSubsample.Ratio444, 75)] [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb32, JpegSubsample.Ratio444, 75)]
public void OpenBmp_SaveJpeg<TColor>(TestImageProvider<TColor> provider, JpegSubsample subSample, int quality) public void OpenBmp_SaveJpeg<TColor>(TestImageProvider<TColor> provider, JpegSubsample subSample, int quality)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {

4
tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs

@ -39,7 +39,7 @@ namespace ImageSharp.Tests
} }
[Theory] [Theory]
[WithMemberFactory(nameof(CreateTestImage), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb)] [WithMemberFactory(nameof(CreateTestImage), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb32)]
public void CopyStretchedRGBTo_FromOrigo<TColor>(TestImageProvider<TColor> provider) public void CopyStretchedRGBTo_FromOrigo<TColor>(TestImageProvider<TColor> provider)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {
@ -61,7 +61,7 @@ namespace ImageSharp.Tests
} }
[Theory] [Theory]
[WithMemberFactory(nameof(CreateTestImage), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb)] [WithMemberFactory(nameof(CreateTestImage), PixelTypes.Color | PixelTypes.StandardImageClass | PixelTypes.Argb32)]
public void CopyStretchedRGBTo_WithOffset<TColor>(TestImageProvider<TColor> provider) public void CopyStretchedRGBTo_WithOffset<TColor>(TestImageProvider<TColor> provider)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {

2
tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs

@ -18,7 +18,7 @@ namespace ImageSharp.Tests
Alpha8 = 1 << 0, Alpha8 = 1 << 0,
Argb = 1 << 1, Argb32 = 1 << 1,
Bgr565 = 1 << 2, Bgr565 = 1 << 2,

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

@ -20,7 +20,7 @@ namespace ImageSharp.Tests
private ITestOutputHelper Output { get; } private ITestOutputHelper Output { get; }
[Theory] [Theory]
[WithBlankImages(42, 666, PixelTypes.Color | PixelTypes.Argb | PixelTypes.HalfSingle, "hello")] [WithBlankImages(42, 666, PixelTypes.Color | PixelTypes.Argb32 | PixelTypes.HalfSingle, "hello")]
public void Use_WithEmptyImageAttribute<TColor>(TestImageProvider<TColor> provider, string message) public void Use_WithEmptyImageAttribute<TColor>(TestImageProvider<TColor> provider, string message)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {
@ -86,7 +86,7 @@ namespace ImageSharp.Tests
public static string[] AllBmpFiles => TestImages.Bmp.All; public static string[] AllBmpFiles => TestImages.Bmp.All;
[Theory] [Theory]
[WithFileCollection(nameof(AllBmpFiles), PixelTypes.Color | PixelTypes.Argb)] [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Color | PixelTypes.Argb32)]
public void Use_WithFileCollection<TColor>(TestImageProvider<TColor> provider) public void Use_WithFileCollection<TColor>(TestImageProvider<TColor> provider)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {
@ -96,7 +96,7 @@ namespace ImageSharp.Tests
} }
[Theory] [Theory]
[WithSolidFilledImages(10, 20, 255, 100, 50, 200, PixelTypes.Color | PixelTypes.Argb)] [WithSolidFilledImages(10, 20, 255, 100, 50, 200, PixelTypes.Color | PixelTypes.Argb32)]
public void Use_WithSolidFilledImagesAttribute<TColor>(TestImageProvider<TColor> provider) public void Use_WithSolidFilledImagesAttribute<TColor>(TestImageProvider<TColor> provider)
where TColor : struct, IPixel<TColor> where TColor : struct, IPixel<TColor>
{ {

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

@ -85,7 +85,7 @@ namespace ImageSharp.Tests
[Theory] [Theory]
[InlineData(PixelTypes.Color, typeof(Color))] [InlineData(PixelTypes.Color, typeof(Color))]
[InlineData(PixelTypes.Argb, typeof(Argb32))] [InlineData(PixelTypes.Argb32, typeof(Argb32))]
[InlineData(PixelTypes.HalfVector4, typeof(HalfVector4))] [InlineData(PixelTypes.HalfVector4, typeof(HalfVector4))]
[InlineData(PixelTypes.StandardImageClass, typeof(Color))] [InlineData(PixelTypes.StandardImageClass, typeof(Color))]
public void ToType(PixelTypes pt, Type expectedType) public void ToType(PixelTypes pt, Type expectedType)
@ -95,7 +95,7 @@ namespace ImageSharp.Tests
[Theory] [Theory]
[InlineData(typeof(Color), PixelTypes.Color)] [InlineData(typeof(Color), PixelTypes.Color)]
[InlineData(typeof(Argb32), PixelTypes.Argb)] [InlineData(typeof(Argb32), PixelTypes.Argb32)]
public void GetPixelType(Type clrType, PixelTypes expectedPixelType) public void GetPixelType(Type clrType, PixelTypes expectedPixelType)
{ {
Assert.Equal(expectedPixelType, clrType.GetPixelType()); Assert.Equal(expectedPixelType, clrType.GetPixelType());

Loading…
Cancel
Save