From: dotnet-maestro[bot] Date: Thu, 20 Jun 2019 01:50:19 +0000 (+0000) Subject: [master] Update dependencies from dotnet/coreclr (dotnet/corefx#38679) X-Git-Tag: submit/tizen/20210909.063632~11031^2~1231 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a83ac4ababdf26b352a0a7bb08b1973cc6cf14e7;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [master] Update dependencies from dotnet/coreclr (dotnet/corefx#38679) * 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 --- diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.T.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.T.cs index bfc1732..4451253 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.T.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.T.cs @@ -292,7 +292,7 @@ namespace System.SpanTests values = new ReadOnlySpan(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(new string[] { }); idx = sp.IndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.byte.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.byte.cs index b6384aa..48f9200 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.byte.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.byte.cs @@ -349,7 +349,7 @@ namespace System.SpanTests values = new ReadOnlySpan(new byte[] { }); idx = sp.IndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.char.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.char.cs index b3de4ac..d02539d 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.char.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/IndexOfAny.char.cs @@ -596,7 +596,7 @@ namespace System.SpanTests values = new ReadOnlySpan(new char[] { }); idx = sp.IndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.T.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.T.cs index 3bb87a0..32d5464 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.T.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.T.cs @@ -286,7 +286,7 @@ namespace System.SpanTests values = new ReadOnlySpan(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(new string[] { }); idx = sp.LastIndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.byte.cs b/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.byte.cs index 7ed3e40..d8aaea4 100644 --- a/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.byte.cs +++ b/src/libraries/System.Memory/tests/ReadOnlySpan/LastIndexOfAny.byte.cs @@ -337,7 +337,7 @@ namespace System.SpanTests values = new ReadOnlySpan(new byte[] { }); idx = sp.LastIndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/Span/IndexOfAny.T.cs b/src/libraries/System.Memory/tests/Span/IndexOfAny.T.cs index c257c6a..cc42791 100644 --- a/src/libraries/System.Memory/tests/Span/IndexOfAny.T.cs +++ b/src/libraries/System.Memory/tests/Span/IndexOfAny.T.cs @@ -292,7 +292,7 @@ namespace System.SpanTests values = new ReadOnlySpan(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(new string[] { }); idx = sp.IndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/Span/IndexOfAny.byte.cs b/src/libraries/System.Memory/tests/Span/IndexOfAny.byte.cs index a5250a0..2596044 100644 --- a/src/libraries/System.Memory/tests/Span/IndexOfAny.byte.cs +++ b/src/libraries/System.Memory/tests/Span/IndexOfAny.byte.cs @@ -349,7 +349,7 @@ namespace System.SpanTests values = new ReadOnlySpan(new byte[] { }); idx = sp.IndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/Span/IndexOfAny.char.cs b/src/libraries/System.Memory/tests/Span/IndexOfAny.char.cs index c5c4899..84737b5 100644 --- a/src/libraries/System.Memory/tests/Span/IndexOfAny.char.cs +++ b/src/libraries/System.Memory/tests/Span/IndexOfAny.char.cs @@ -597,7 +597,7 @@ namespace System.SpanTests values = new ReadOnlySpan(new char[] { }); idx = sp.IndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/Span/LastIndexOfAny.T.cs b/src/libraries/System.Memory/tests/Span/LastIndexOfAny.T.cs index 8b6570c..5fb04db 100644 --- a/src/libraries/System.Memory/tests/Span/LastIndexOfAny.T.cs +++ b/src/libraries/System.Memory/tests/Span/LastIndexOfAny.T.cs @@ -286,7 +286,7 @@ namespace System.SpanTests values = new ReadOnlySpan(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(new string[] { }); idx = sp.LastIndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Memory/tests/Span/LastIndexOfAny.byte.cs b/src/libraries/System.Memory/tests/Span/LastIndexOfAny.byte.cs index 652f5c1..3b79147 100644 --- a/src/libraries/System.Memory/tests/Span/LastIndexOfAny.byte.cs +++ b/src/libraries/System.Memory/tests/Span/LastIndexOfAny.byte.cs @@ -337,7 +337,7 @@ namespace System.SpanTests values = new ReadOnlySpan(new byte[] { }); idx = sp.LastIndexOfAny(values); - Assert.Equal(0, idx); + Assert.Equal(-1, idx); } [Fact] diff --git a/src/libraries/System.Runtime/tests/System/ArrayTests.cs b/src/libraries/System.Runtime/tests/System/ArrayTests.cs index 7ea3c94..d91f9ac 100644 --- a/src/libraries/System.Runtime/tests/System/ArrayTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArrayTests.cs @@ -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] };