Guard for large array support in System.Drawing.Common tests (dotnet/corefx#38672)
authorFilip Navara <filip.navara@gmail.com>
Wed, 19 Jun 2019 10:32:08 +0000 (12:32 +0200)
committerDan Moseley <danmose@microsoft.com>
Wed, 19 Jun 2019 10:32:08 +0000 (03:32 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/fd9801068f1baf8d69893da2a414eee7556e51b0

src/libraries/System.Drawing.Common/tests/Drawing2D/BlendTests.cs
src/libraries/System.Drawing.Common/tests/Drawing2D/ColorBlendTests.cs

index e9822f6..85bb8ec 100644 (file)
@@ -32,7 +32,7 @@ namespace System.Drawing.Drawing2D.Tests
             Assert.Throws<OverflowException>(() => new Blend(-1));
         }
         
-        [Fact]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotIntMaxValueArrayIndexSupported))]
         public void Ctor_LargeCount_ThrowsOutOfMemoryException()
         {
             Assert.Throws<OutOfMemoryException>(() => new Blend(int.MaxValue));
index 0d77cca..24a82fc 100644 (file)
@@ -32,7 +32,7 @@ namespace System.Drawing.Drawing2D.Tests
             Assert.Throws<OverflowException>(() => new ColorBlend(-1));
         }
         
-        [Fact]
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotIntMaxValueArrayIndexSupported))]
         public void Ctor_LargeCount_ThrowsOutOfMemoryException()
         {
             Assert.Throws<OutOfMemoryException>(() => new ColorBlend(int.MaxValue));