diff options
author | Atsushi Kanamori <AtsushiKan@users.noreply.github.com> | 2017-04-21 20:31:22 +0300 |
---|---|---|
committer | Dan Moseley <danmose@microsoft.com> | 2017-04-21 20:31:22 +0300 |
commit | 495d3eac3d78d004a223faaf4f992cf9f1fc1112 (patch) | |
tree | c5bbb6a2efde5068b841d6a814aa7157de34633c /src/System.Collections.NonGeneric | |
parent | 98e1a453240ab4e61394eea512175ec192236e82 (diff) |
Disable all the non-zero lower bound array failures in Collections tests. (#18737)
Diffstat (limited to 'src/System.Collections.NonGeneric')
4 files changed, 13 insertions, 1 deletions
diff --git a/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.IDictionary.Tests.cs b/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.IDictionary.Tests.cs index 625a49d9a9..51a8b6f6ee 100644 --- a/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.IDictionary.Tests.cs +++ b/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.IDictionary.Tests.cs @@ -40,6 +40,9 @@ namespace System.Collections.Tests [MemberData(nameof(ValidCollectionSizes))] public override void ICollection_NonGeneric_CopyTo_NonZeroLowerBound(int count) { + if (!PlatformDetection.IsNonZeroLowerBoundArraySupported) + return; + ICollection collection = NonGenericICollectionFactory(count); Array arr = Array.CreateInstance(typeof(object), new int[] { count }, new int[] { 2 }); Assert.Equal(1, arr.Rank); diff --git a/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Keys.Tests.cs b/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Keys.Tests.cs index 557fb4739f..ba78ffa4f3 100644 --- a/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Keys.Tests.cs +++ b/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Keys.Tests.cs @@ -45,6 +45,9 @@ namespace System.Collections.Tests [MemberData(nameof(ValidCollectionSizes))] public override void ICollection_NonGeneric_CopyTo_NonZeroLowerBound(int count) { + if (!PlatformDetection.IsNonZeroLowerBoundArraySupported) + return; + ICollection collection = NonGenericICollectionFactory(count); Array arr = Array.CreateInstance(typeof(object), new int[] { count }, new int[] { 2 }); Assert.Equal(1, arr.Rank); diff --git a/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Values.Tests.cs b/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Values.Tests.cs index 3020c593a6..e296630624 100644 --- a/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Values.Tests.cs +++ b/src/System.Collections.NonGeneric/tests/Hashtable/Hashtable.Values.Tests.cs @@ -46,6 +46,9 @@ namespace System.Collections.Tests [MemberData(nameof(ValidCollectionSizes))] public override void ICollection_NonGeneric_CopyTo_NonZeroLowerBound(int count) { + if (!PlatformDetection.IsNonZeroLowerBoundArraySupported) + return; + ICollection collection = NonGenericICollectionFactory(count); Array arr = Array.CreateInstance(typeof(object), new int[] { count }, new int[] { 2 }); Assert.Equal(1, arr.Rank); diff --git a/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj b/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj index 91434540d8..76b557dece 100644 --- a/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj +++ b/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj @@ -53,6 +53,9 @@ <Compile Include="$(CommonTestPath)\System\Collections\IEnumerable.NonGeneric.Serialization.Tests.cs"> <Link>Common\System\Collections\IEnumerable.NonGeneric.Serialization.Tests.cs</Link> </Compile> + <Compile Include="$(CommonTestPath)\System\PlatformDetection.cs"> + <Link>CommonTest\System\PlatformDetection.cs</Link> + </Compile> </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> -</Project>
\ No newline at end of file +</Project> |