[master] Update dependencies from dotnet/coreclr (dotnet/corefx#38679)
authordotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Thu, 20 Jun 2019 01:50:19 +0000 (01:50 +0000)
committerGitHub <noreply@github.com>
Thu, 20 Jun 2019 01:50:19 +0000 (01:50 +0000)
* Update dependencies from https://github.com/dotnet/coreclr build 20190618.4

- Microsoft.NET.Sdk.IL - 3.0.0-preview7.19318.4
- Microsoft.NETCore.ILAsm - 3.0.0-preview7.19318.4
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview7.19318.4

* IndexOfAny ZeroLength values

* Test updates for relaxed Array.Copy type checks

Fixes dotnet/corefx#38535

Commit migrated from https://github.com/dotnet/corefx/commit/51a9c8f1dc56d366f5eb435f231052e2614c7a76

src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.T.cs
src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.byte.cs
src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.char.cs
src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.T.cs
src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.byte.cs
src/libraries/System.Memory/tests/Span/IndexOfAny.T.cs
src/libraries/System.Memory/tests/Span/IndexOfAny.byte.cs
src/libraries/System.Memory/tests/Span/IndexOfAny.char.cs
src/libraries/System.Memory/tests/Span/LastIndexOfAny.T.cs
src/libraries/System.Memory/tests/Span/LastIndexOfAny.byte.cs
src/libraries/System.Runtime/tests/System/ArrayTests.cs

index bfc1732..4451253 100644 (file)
@@ -292,7 +292,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<int>(new int[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
@@ -770,7 +770,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<string>(new string[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index b6384aa..48f9200 100644 (file)
@@ -349,7 +349,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<byte>(new byte[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index b3de4ac..d02539d 100644 (file)
@@ -596,7 +596,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<char>(new char[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index 3bb87a0..32d5464 100644 (file)
@@ -286,7 +286,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<int>(new int[] { });
             idx = sp.LastIndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
@@ -749,7 +749,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<string>(new string[] { });
             idx = sp.LastIndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index 7ed3e40..d8aaea4 100644 (file)
@@ -337,7 +337,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<byte>(new byte[] { });
             idx = sp.LastIndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index c257c6a..cc42791 100644 (file)
@@ -292,7 +292,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<int>(new int[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
@@ -770,7 +770,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<string>(new string[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index a5250a0..2596044 100644 (file)
@@ -349,7 +349,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<byte>(new byte[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index c5c4899..84737b5 100644 (file)
@@ -597,7 +597,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<char>(new char[] { });
             idx = sp.IndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index 8b6570c..5fb04db 100644 (file)
@@ -286,7 +286,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<int>(new int[] { });
             idx = sp.LastIndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
@@ -747,7 +747,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<string>(new string[] { });
             idx = sp.LastIndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index 652f5c1..3b79147 100644 (file)
@@ -337,7 +337,7 @@ namespace System.SpanTests
 
             values = new ReadOnlySpan<byte>(new byte[] { });
             idx = sp.LastIndexOfAny(values);
-            Assert.Equal(0, idx);
+            Assert.Equal(-1, idx);
         }
 
         [Fact]
index 7ea3c94..d91f9ac 100644 (file)
@@ -1055,6 +1055,18 @@ namespace System.Tests
 
             yield return new object[] { new int[1] { 2 }, 0, new Int32Enum[1], 0, 1, new Int32Enum[] { (Int32Enum)2 } };
 
+            // Signed/Unsigned conversions
+            yield return new object[] { new byte[] { unchecked((byte)-2) }, 0, new sbyte[1], 0, 1, new sbyte[] { -2 } };
+            yield return new object[] { new sbyte[] { -3 }, 0, new byte[1], 0, 1, new byte[] { unchecked((byte)-3) } };
+            yield return new object[] { new ushort[] { unchecked((ushort)-4) }, 0, new short[1], 0, 1, new short[] { -4 } };
+            yield return new object[] { new short[] { -5 }, 0, new ushort[1], 0, 1, new ushort[] { unchecked((ushort)-5) } };
+            yield return new object[] { new uint[] { unchecked((uint)-6) }, 0, new int[1], 0, 1, new int[] { -6 } };
+            yield return new object[] { new int[] { -7 }, 0, new uint[1], 0, 1, new uint[] { unchecked((uint)-7) } };
+            yield return new object[] { new ulong[] { unchecked((ulong)-8) }, 0, new long[1], 0, 1, new long[] { -8 } };
+            yield return new object[] { new long[] { -9 }, 0, new ulong[1], 0, 1, new ulong[] { unchecked((ulong)-9) } };
+            yield return new object[] { new UIntPtr[] { new UIntPtr(10) }, 0, new IntPtr[1], 0, 1, new IntPtr[] { new IntPtr(10) } };
+            yield return new object[] { new IntPtr[] { new IntPtr(11) }, 0, new UIntPtr[1], 0, 1, new UIntPtr[] { new UIntPtr(11) } };
+
             // Misc
             yield return new object[] { new int[] { 0x12345678, 0x22334455, 0x778899aa }, 0, new int[3], 0, 3, new int[] { 0x12345678, 0x22334455, 0x778899aa } };
 
@@ -1362,7 +1374,6 @@ namespace System.Tests
             yield return new object[] { new ushort[1][], new char[1][] };
 
             // Can't primitive widen Int64
-            yield return new object[] { new long[1], new ulong[1] };
             yield return new object[] { new long[1], new int[1] };
             yield return new object[] { new long[1], new uint[1] };
             yield return new object[] { new long[1], new short[1] };
@@ -1375,7 +1386,6 @@ namespace System.Tests
             yield return new object[] { new long[1], new UIntPtr[1] };
 
             // Can't primitive widen UInt64
-            yield return new object[] { new ulong[1], new long[1] };
             yield return new object[] { new ulong[1], new int[1] };
             yield return new object[] { new ulong[1], new uint[1] };
             yield return new object[] { new ulong[1], new short[1] };
@@ -1389,7 +1399,6 @@ namespace System.Tests
 
             // Can't primitive widen Int32
             yield return new object[] { new int[1], new ulong[1] };
-            yield return new object[] { new int[1], new uint[1] };
             yield return new object[] { new int[1], new short[1] };
             yield return new object[] { new int[1], new ushort[1] };
             yield return new object[] { new int[1], new sbyte[1] };
@@ -1411,8 +1420,6 @@ namespace System.Tests
 
             // Can't primitive widen Int16
             yield return new object[] { new short[1], new ulong[1] };
-            yield return new object[] { new short[1], new ushort[1] };
-            yield return new object[] { new short[1], new ushort[1] };
             yield return new object[] { new short[1], new sbyte[1] };
             yield return new object[] { new short[1], new byte[1] };
             yield return new object[] { new short[1], new char[1] };
@@ -1431,14 +1438,12 @@ namespace System.Tests
             yield return new object[] { new sbyte[1], new ulong[1] };
             yield return new object[] { new sbyte[1], new uint[1] };
             yield return new object[] { new sbyte[1], new ushort[1] };
-            yield return new object[] { new sbyte[1], new byte[1] };
             yield return new object[] { new sbyte[1], new char[1] };
             yield return new object[] { new sbyte[1], new bool[1] };
             yield return new object[] { new sbyte[1], new IntPtr[1] };
             yield return new object[] { new sbyte[1], new UIntPtr[1] };
 
             // Can't primitive widen Byte
-            yield return new object[] { new byte[1], new sbyte[1] };
             yield return new object[] { new byte[1], new bool[1] };
             yield return new object[] { new byte[1], new IntPtr[1] };
             yield return new object[] { new byte[1], new UIntPtr[1] };
@@ -1500,7 +1505,6 @@ namespace System.Tests
             yield return new object[] { new IntPtr[1], new bool[1] };
             yield return new object[] { new IntPtr[1], new float[1] };
             yield return new object[] { new IntPtr[1], new double[1] };
-            yield return new object[] { new IntPtr[1], new UIntPtr[1] };
 
             // Can't primitive widen UIntPtr
             yield return new object[] { new UIntPtr[1], new long[1] };
@@ -1515,7 +1519,6 @@ namespace System.Tests
             yield return new object[] { new UIntPtr[1], new bool[1] };
             yield return new object[] { new UIntPtr[1], new float[1] };
             yield return new object[] { new UIntPtr[1], new double[1] };
-            yield return new object[] { new UIntPtr[1], new IntPtr[1] };
 
             // Interface[] -> Any[] only works if Any implements Interface
             yield return new object[] { new NonGenericInterface2[1], new StructWithNonGenericInterface1[1] };