|
|
|
@ -3,7 +3,6 @@ |
|
|
|
|
|
|
|
// <auto-generated />
|
|
|
|
|
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
using Xunit; |
|
|
|
using Xunit.Abstractions; |
|
|
|
@ -23,20 +22,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<A8.PixelOperations>(PixelOperations<A8>.Instance); |
|
|
|
protected override PixelOperations<A8> Operations => A8.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = A8.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<A8>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<A8.PixelOperations>(PixelOperations<A8>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = A8.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -50,20 +44,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Argb32.PixelOperations>(PixelOperations<Argb32>.Instance); |
|
|
|
protected override PixelOperations<Argb32> Operations => Argb32.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Argb32.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Argb32>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Argb32.PixelOperations>(PixelOperations<Argb32>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Argb32.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -77,20 +66,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgr24.PixelOperations>(PixelOperations<Bgr24>.Instance); |
|
|
|
protected override PixelOperations<Bgr24> Operations => Bgr24.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Bgr24.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Bgr24>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgr24.PixelOperations>(PixelOperations<Bgr24>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Bgr24.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -104,20 +88,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgr565.PixelOperations>(PixelOperations<Bgr565>.Instance); |
|
|
|
protected override PixelOperations<Bgr565> Operations => Bgr565.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Bgr565.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Bgr565>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgr565.PixelOperations>(PixelOperations<Bgr565>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Bgr565.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -131,20 +110,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgra32.PixelOperations>(PixelOperations<Bgra32>.Instance); |
|
|
|
protected override PixelOperations<Bgra32> Operations => Bgra32.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Bgra32.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Bgra32>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgra32.PixelOperations>(PixelOperations<Bgra32>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Bgra32.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -158,20 +132,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgra4444.PixelOperations>(PixelOperations<Bgra4444>.Instance); |
|
|
|
protected override PixelOperations<Bgra4444> Operations => Bgra4444.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Bgra4444.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Bgra4444>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgra4444.PixelOperations>(PixelOperations<Bgra4444>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Bgra4444.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -185,20 +154,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgra5551.PixelOperations>(PixelOperations<Bgra5551>.Instance); |
|
|
|
protected override PixelOperations<Bgra5551> Operations => Bgra5551.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Bgra5551.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Bgra5551>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Bgra5551.PixelOperations>(PixelOperations<Bgra5551>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Bgra5551.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -212,20 +176,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Byte4.PixelOperations>(PixelOperations<Byte4>.Instance); |
|
|
|
protected override PixelOperations<Byte4> Operations => Byte4.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Byte4.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Byte4>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Byte4.PixelOperations>(PixelOperations<Byte4>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Byte4.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -239,20 +198,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<HalfSingle.PixelOperations>(PixelOperations<HalfSingle>.Instance); |
|
|
|
protected override PixelOperations<HalfSingle> Operations => HalfSingle.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = HalfSingle.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<HalfSingle>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<HalfSingle.PixelOperations>(PixelOperations<HalfSingle>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = HalfSingle.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -266,20 +220,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<HalfVector2.PixelOperations>(PixelOperations<HalfVector2>.Instance); |
|
|
|
protected override PixelOperations<HalfVector2> Operations => HalfVector2.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = HalfVector2.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<HalfVector2>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<HalfVector2.PixelOperations>(PixelOperations<HalfVector2>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = HalfVector2.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -293,20 +242,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<HalfVector4.PixelOperations>(PixelOperations<HalfVector4>.Instance); |
|
|
|
protected override PixelOperations<HalfVector4> Operations => HalfVector4.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = HalfVector4.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<HalfVector4>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<HalfVector4.PixelOperations>(PixelOperations<HalfVector4>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = HalfVector4.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -320,20 +264,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<L16.PixelOperations>(PixelOperations<L16>.Instance); |
|
|
|
protected override PixelOperations<L16> Operations => L16.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = L16.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<L16>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<L16.PixelOperations>(PixelOperations<L16>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = L16.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -347,20 +286,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<L8.PixelOperations>(PixelOperations<L8>.Instance); |
|
|
|
protected override PixelOperations<L8> Operations => L8.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = L8.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<L8>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<L8.PixelOperations>(PixelOperations<L8>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = L8.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -374,20 +308,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<La16.PixelOperations>(PixelOperations<La16>.Instance); |
|
|
|
protected override PixelOperations<La16> Operations => La16.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = La16.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<La16>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<La16.PixelOperations>(PixelOperations<La16>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = La16.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -401,20 +330,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<La32.PixelOperations>(PixelOperations<La32>.Instance); |
|
|
|
protected override PixelOperations<La32> Operations => La32.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = La32.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<La32>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<La32.PixelOperations>(PixelOperations<La32>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = La32.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -428,20 +352,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedByte2.PixelOperations>(PixelOperations<NormalizedByte2>.Instance); |
|
|
|
protected override PixelOperations<NormalizedByte2> Operations => NormalizedByte2.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = NormalizedByte2.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<NormalizedByte2>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedByte2.PixelOperations>(PixelOperations<NormalizedByte2>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = NormalizedByte2.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -455,20 +374,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedByte4.PixelOperations>(PixelOperations<NormalizedByte4>.Instance); |
|
|
|
protected override PixelOperations<NormalizedByte4> Operations => NormalizedByte4.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = NormalizedByte4.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<NormalizedByte4>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedByte4.PixelOperations>(PixelOperations<NormalizedByte4>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = NormalizedByte4.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -482,20 +396,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedShort2.PixelOperations>(PixelOperations<NormalizedShort2>.Instance); |
|
|
|
protected override PixelOperations<NormalizedShort2> Operations => NormalizedShort2.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = NormalizedShort2.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<NormalizedShort2>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedShort2.PixelOperations>(PixelOperations<NormalizedShort2>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = NormalizedShort2.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -509,20 +418,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedShort4.PixelOperations>(PixelOperations<NormalizedShort4>.Instance); |
|
|
|
protected override PixelOperations<NormalizedShort4> Operations => NormalizedShort4.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = NormalizedShort4.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<NormalizedShort4>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<NormalizedShort4.PixelOperations>(PixelOperations<NormalizedShort4>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = NormalizedShort4.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -536,20 +440,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rg32.PixelOperations>(PixelOperations<Rg32>.Instance); |
|
|
|
protected override PixelOperations<Rg32> Operations => Rg32.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Rg32.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Rg32>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rg32.PixelOperations>(PixelOperations<Rg32>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Rg32.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -563,20 +462,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgb24.PixelOperations>(PixelOperations<Rgb24>.Instance); |
|
|
|
protected override PixelOperations<Rgb24> Operations => Rgb24.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Rgb24.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Rgb24>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgb24.PixelOperations>(PixelOperations<Rgb24>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Rgb24.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -590,20 +484,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgb48.PixelOperations>(PixelOperations<Rgb48>.Instance); |
|
|
|
protected override PixelOperations<Rgb48> Operations => Rgb48.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Rgb48.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Rgb48>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgb48.PixelOperations>(PixelOperations<Rgb48>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Rgb48.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -617,20 +506,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgba1010102.PixelOperations>(PixelOperations<Rgba1010102>.Instance); |
|
|
|
protected override PixelOperations<Rgba1010102> Operations => Rgba1010102.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Rgba1010102.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Rgba1010102>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgba1010102.PixelOperations>(PixelOperations<Rgba1010102>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Rgba1010102.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -644,20 +528,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgba32.PixelOperations>(PixelOperations<Rgba32>.Instance); |
|
|
|
protected override PixelOperations<Rgba32> Operations => Rgba32.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Rgba32.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Rgba32>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgba32.PixelOperations>(PixelOperations<Rgba32>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Rgba32.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -671,20 +550,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgba64.PixelOperations>(PixelOperations<Rgba64>.Instance); |
|
|
|
protected override PixelOperations<Rgba64> Operations => Rgba64.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Rgba64.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Rgba64>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Rgba64.PixelOperations>(PixelOperations<Rgba64>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Rgba64.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -698,20 +572,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<RgbaVector.PixelOperations>(PixelOperations<RgbaVector>.Instance); |
|
|
|
protected override PixelOperations<RgbaVector> Operations => RgbaVector.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = RgbaVector.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<RgbaVector>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<RgbaVector.PixelOperations>(PixelOperations<RgbaVector>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = RgbaVector.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -725,20 +594,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Short2.PixelOperations>(PixelOperations<Short2>.Instance); |
|
|
|
protected override PixelOperations<Short2> Operations => Short2.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Short2.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Short2>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Short2.PixelOperations>(PixelOperations<Short2>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Short2.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.None, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -752,20 +616,15 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations |
|
|
|
this.HasUnassociatedAlpha = alphaRepresentation == PixelAlphaRepresentation.Unassociated; |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Short4.PixelOperations>(PixelOperations<Short4>.Instance); |
|
|
|
protected override PixelOperations<Short4> Operations => Short4.PixelOperations.Instance; |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectBitsPerPixel() |
|
|
|
{ |
|
|
|
var bits = Short4.PixelOperations.Instance.GetPixelTypeInfo().BitsPerPixel; |
|
|
|
Assert.Equal(Unsafe.SizeOf<Short4>() * 8, bits); |
|
|
|
} |
|
|
|
public void IsSpecialImplementation() => Assert.IsType<Short4.PixelOperations>(PixelOperations<Short4>.Instance); |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void PixelTypeInfoHasCorrectAlphaRepresentation() |
|
|
|
{ |
|
|
|
var alphaRepresentation = Short4.PixelOperations.Instance.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
var alphaRepresentation = this.Operations.GetPixelTypeInfo().AlphaRepresentation; |
|
|
|
Assert.Equal(PixelAlphaRepresentation.Unassociated, alphaRepresentation); |
|
|
|
} |
|
|
|
} |
|
|
|
|