Browse Source

fix

pull/109/head
Anton Firszov 9 years ago
parent
commit
4501ca5fb4
  1. 2
      global.json
  2. 2
      tests/ImageSharp.Tests/Common/ArrayPointerTests.cs
  3. 9
      tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs
  4. 10
      tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs

2
global.json

@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.0.0-preview2-003131"
"version": "1.0.0-preview2-003121"
}
}

2
tests/ImageSharp.Tests/Common/ArrayPointerTests.cs

@ -10,9 +10,11 @@ namespace ImageSharp.Tests.Common
{
public struct Foo
{
#pragma warning disable CS0414
private int a;
private double b;
#pragma warning restore CS0414
internal static Foo[] CreateArray(int size)
{

9
tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs

@ -45,15 +45,6 @@ namespace ImageSharp.Tests
PixelTypes2ClrTypes[PixelTypes.StandardImageClass] = typeof(Color);
}
public static Type GetPackedType(Type pixelType)
{
var intrfcType =
pixelType.GetInterfaces()
.Single(i => i.IsConstructedGenericType && i.GetGenericTypeDefinition() == typeof(IPackedPixel<>));
return intrfcType.GetGenericArguments().Single();
}
public static bool HasFlag(this PixelTypes pixelTypes, PixelTypes flag) => (pixelTypes & flag) == flag;
public static bool IsEquivalentTo<TColor>(this Image<TColor> a, Image<TColor> b, bool compareAlpha = true)

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

@ -57,15 +57,7 @@ namespace ImageSharp.Tests
var fake = typeof(Color).GetTypeInfo().Assembly.GetType("ImageSharp.dsaada_DASqewrr");
Assert.Null(fake);
}
[Fact]
public void GetPackedType()
{
Type shouldBeUIint32 = TestUtilityExtensions.GetPackedType(typeof(Color));
Assert.Equal(shouldBeUIint32, typeof(uint));
}
[Theory]
[WithFile(TestImages.Bmp.Car, PixelTypes.Color, true)]
[WithFile(TestImages.Bmp.Car, PixelTypes.Color, false)]

Loading…
Cancel
Save