[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 bfc1732a1893fe7f360fa317d0ff8c4d48018ff3..4451253d57baae2f2e7aca18c04ecf91fa3be10b 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 b6384aacaff16cc7e94d7f4d00c13b4d05ef965d..48f9200b184bb76b486660eb33df33515b3faa46 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 b3de4ac35133e11175111ef4915a2a264fddb05c..d02539d35e9c83ce6bec1a8a78fdf356b7e7883b 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 3bb87a0915415b70b1aa49ef075ec9c59ee3a75c..32d5464cf68df1aeecf7a4a2ec813324b0e70460 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 7ed3e40c2cf10398bfda2309d7376a95b2bd6aac..d8aaea421b63d1c6dd0501f777232c7d0448b301 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 c257c6a3b6f86d77bfe854ea65adfcace2f557fa..cc4279169f3815649065f02ab4231124977f05a7 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 a5250a03e58246f25e3f776da70238170bd1a1fc..25960447ee7f7820a1768ad1285d4c0b8f6fdffa 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 c5c48996c72df410d9ba75a6b4d766e9bff2d756..84737b590dbfb9f656cf3c357153d505d0fddd75 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 8b6570c54c6e3e2e6cc5d482d9013b7a823f8846..5fb04dbd3f07fd6674cac752875671fcc8a444d9 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 652f5c1bca3f882394c49176010b3e3c21c11208..3b7914758de510ba3d47e147e40a294c1a81d16c 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 7ea3c94703e903397c63821e49393acde02d5adc..d91f9ac17dc26b25e0db77702080d532adc24cb5 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] };