From 5e3192785b464fe7d67a793b3e468ea7ac30db1d Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Sat, 31 Mar 2018 12:49:27 +0200 Subject: [PATCH] skip ToVector4SimdAligned() test in environments without SIMD --- tests/ImageSharp.Tests/PixelFormats/PixelOperationsTests.cs | 5 +++++ tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/tests/ImageSharp.Tests/PixelFormats/PixelOperationsTests.cs b/tests/ImageSharp.Tests/PixelFormats/PixelOperationsTests.cs index 7a942246e3..31d328a272 100644 --- a/tests/ImageSharp.Tests/PixelFormats/PixelOperationsTests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/PixelOperationsTests.cs @@ -31,6 +31,11 @@ namespace SixLabors.ImageSharp.Tests.PixelFormats [Fact] public void ToVector4SimdAligned() { + if (!Vector.IsHardwareAccelerated) + { + return; + } + ImageSharp.PixelFormats.Rgba32[] source = CreatePixelTestData(64); Vector4[] expected = CreateExpectedVector4Data(source); diff --git a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs index d2282f3994..f855c2f8ea 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs @@ -95,6 +95,8 @@ namespace SixLabors.ImageSharp.Tests internal static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + internal static bool Is64BitProcess => IntPtr.Size == 8; + /// /// Creates the image output directory. ///