From 4501ca5fb4099f1ddaba19e140aed88c7942924f Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Sat, 18 Feb 2017 17:45:21 +0100 Subject: [PATCH] fix --- global.json | 2 +- tests/ImageSharp.Tests/Common/ArrayPointerTests.cs | 2 ++ .../TestUtilities/TestUtilityExtensions.cs | 9 --------- .../TestUtilities/Tests/TestUtilityExtensionsTests.cs | 10 +--------- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/global.json b/global.json index 6da79b611..7346bdc28 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "projects": [ "src" ], "sdk": { - "version": "1.0.0-preview2-003131" + "version": "1.0.0-preview2-003121" } } \ No newline at end of file diff --git a/tests/ImageSharp.Tests/Common/ArrayPointerTests.cs b/tests/ImageSharp.Tests/Common/ArrayPointerTests.cs index 1d229f86a..64cd306f3 100644 --- a/tests/ImageSharp.Tests/Common/ArrayPointerTests.cs +++ b/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) { diff --git a/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs index 748bd5293..ca3340238 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs +++ b/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(this Image a, Image b, bool compareAlpha = true) diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs index ad35cb80f..1db209dcd 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs +++ b/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)]