From c937f1f943ed6ee6b0cc361bf0b02ce14ef1b192 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Wed, 17 Apr 2019 17:48:24 -0700 Subject: [PATCH] Manually updating dependencies in order to get the new coreclr packages. (dotnet/corefx#36976) * Update the Index and Range interfaces and tests * Fix api compat failure with utf8string * Fix the test to use Assert.Throws * Update dependencies manually Commit migrated from https://github.com/dotnet/corefx/commit/d5a5f3c9eb96adf38115cbc04e5664abf328b02d --- .../System.Memory/tests/Memory/IndexAndRange.cs | 8 +- src/libraries/System.Memory/tests/Span/Indexer.cs | 17 ++-- src/libraries/System.Runtime/ref/System.Runtime.cs | 20 ---- .../System.Runtime/tests/System/IndexTests.cs | 19 ++++ .../System.Runtime/tests/System/RangeTests.cs | 63 ++++++++++++ .../tests/System/StringTests.netcoreapp.cs | 108 ++++++++++----------- .../ref/System.Utf8String.cs | 6 +- .../tests/System/Utf8StringTests.Substring.cs | 10 +- ...piCompatBaseline.netcoreapp.netstandardOnly.txt | 21 +++- .../ApiCompatBaseline.uap.netstandardOnly.txt | 21 +++- 10 files changed, 195 insertions(+), 98 deletions(-) diff --git a/src/libraries/System.Memory/tests/Memory/IndexAndRange.cs b/src/libraries/System.Memory/tests/Memory/IndexAndRange.cs index e5bcf89..b5746b0 100644 --- a/src/libraries/System.Memory/tests/Memory/IndexAndRange.cs +++ b/src/libraries/System.Memory/tests/Memory/IndexAndRange.cs @@ -22,11 +22,11 @@ namespace System.MemoryTests Assert.Equal(memory.Slice(i, a.Length - i), memory[range]); Assert.Equal(roMemory.Slice(i, a.Length - i), roMemory[range]); - Assert.Equal(memory.Slice(i), memory.Slice(Index.FromStart(i))); - Assert.Equal(roMemory.Slice(i), roMemory.Slice(Index.FromStart(i))); + Assert.Equal(memory.Slice(i), memory[i..]); + Assert.Equal(roMemory.Slice(i), roMemory[i..]); - Assert.Equal(memory.Slice(i, a.Length - i), memory.Slice(range)); - Assert.Equal(roMemory.Slice(i, a.Length - i), roMemory.Slice(range)); + Assert.Equal(memory.Slice(i, a.Length - i), memory[range]); + Assert.Equal(roMemory.Slice(i, a.Length - i), roMemory[range]); } range = new Range(Index.FromStart(0), Index.FromStart(a.Length + 1)); diff --git a/src/libraries/System.Memory/tests/Span/Indexer.cs b/src/libraries/System.Memory/tests/Span/Indexer.cs index 5de9c13..f37a7dd 100644 --- a/src/libraries/System.Memory/tests/Span/Indexer.cs +++ b/src/libraries/System.Memory/tests/Span/Indexer.cs @@ -56,20 +56,21 @@ namespace System.SpanTests for (int i = 0; i < span.Length; i++) { - Assert.True(span.Slice(i) == span.Slice(Index.FromStart(i))); - Assert.True(span.Slice(span.Length - i - 1) == span.Slice(Index.FromEnd(i + 1))); + Assert.True(span.Slice(i) == span[i..]); + Assert.True(span.Slice(span.Length - i - 1) == span[^(i + 1)..]); - Assert.True(roSpan.Slice(i) == roSpan.Slice(Index.FromStart(i))); - Assert.True(roSpan.Slice(roSpan.Length - i - 1) == roSpan.Slice(Index.FromEnd(i + 1))); + Assert.True(roSpan.Slice(i) == roSpan[i..]); + Assert.True(roSpan.Slice(roSpan.Length - i - 1) == roSpan[^(i + 1)..]); range = new Range(Index.FromStart(i), Index.FromEnd(0)); - Assert.True(span.Slice(i, span.Length - i) == span.Slice(range)); - Assert.True(roSpan.Slice(i, roSpan.Length - i) == roSpan.Slice(range)); + Assert.True(span.Slice(i, span.Length - i) == span[range]); + Assert.True(roSpan.Slice(i, roSpan.Length - i) == roSpan[range]); } range = new Range(Index.FromStart(0), Index.FromStart(span.Length + 1)); - Assert.Throws(() => new Span(s.ToCharArray()).Slice(range)); - Assert.Throws(() => s.AsSpan().Slice(range)); + + Assert.Throws(delegate() { var spp = new Span(s.ToCharArray())[range]; }); + Assert.Throws(delegate() { var spp = s.AsSpan()[range]; }); } } } \ No newline at end of file diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 6496472..1218e12 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -1732,7 +1732,6 @@ namespace System public Memory(T[] array, int start, int length) { throw null; } public static System.Memory Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } - public System.Memory this[System.Range range] { get { throw null; } } public int Length { get { throw null; } } public System.Span Span { get { throw null; } } public void CopyTo(System.Memory destination) { } @@ -1745,10 +1744,8 @@ namespace System public static implicit operator System.ReadOnlyMemory (System.Memory memory) { throw null; } public static implicit operator System.Memory (T[] array) { throw null; } public System.Buffers.MemoryHandle Pin() { throw null; } - public System.Memory Slice(System.Index startIndex) { throw null; } public System.Memory Slice(int start) { throw null; } public System.Memory Slice(int start, int length) { throw null; } - public System.Memory Slice(System.Range range) { throw null; } public T[] ToArray() { throw null; } public override string ToString() { throw null; } public bool TryCopyTo(System.Memory destination) { throw null; } @@ -2003,7 +2000,6 @@ namespace System public ReadOnlyMemory(T[] array, int start, int length) { throw null; } public static System.ReadOnlyMemory Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } - public System.ReadOnlyMemory this[System.Range range] { get { throw null; } } public int Length { get { throw null; } } public System.ReadOnlySpan Span { get { throw null; } } public void CopyTo(System.Memory destination) { } @@ -2015,10 +2011,8 @@ namespace System public static implicit operator System.ReadOnlyMemory (System.ArraySegment segment) { throw null; } public static implicit operator System.ReadOnlyMemory (T[] array) { throw null; } public System.Buffers.MemoryHandle Pin() { throw null; } - public System.ReadOnlyMemory Slice(System.Index startIndex) { throw null; } public System.ReadOnlyMemory Slice(int start) { throw null; } public System.ReadOnlyMemory Slice(int start, int length) { throw null; } - public System.ReadOnlyMemory Slice(System.Range range) { throw null; } public T[] ToArray() { throw null; } public override string ToString() { throw null; } public bool TryCopyTo(System.Memory destination) { throw null; } @@ -2033,9 +2027,7 @@ namespace System public ReadOnlySpan(T[] array, int start, int length) { throw null; } public static System.ReadOnlySpan Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } - public ref readonly T this[System.Index index] { get { throw null; } } public ref readonly T this[int index] { get { throw null; } } - public System.ReadOnlySpan this[System.Range range] { get { throw null; } } public int Length { get { throw null; } } public void CopyTo(System.Span destination) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -2051,10 +2043,8 @@ namespace System public static implicit operator System.ReadOnlySpan (System.ArraySegment segment) { throw null; } public static implicit operator System.ReadOnlySpan (T[] array) { throw null; } public static bool operator !=(System.ReadOnlySpan left, System.ReadOnlySpan right) { throw null; } - public System.ReadOnlySpan Slice(System.Index startIndex) { throw null; } public System.ReadOnlySpan Slice(int start) { throw null; } public System.ReadOnlySpan Slice(int start, int length) { throw null; } - public System.ReadOnlySpan Slice(System.Range range) { throw null; } public T[] ToArray() { throw null; } public override string ToString() { throw null; } public bool TryCopyTo(System.Span destination) { throw null; } @@ -2233,9 +2223,7 @@ namespace System public Span(T[] array, int start, int length) { throw null; } public static System.Span Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } - public ref T this[System.Index index] { get { throw null; } } public ref T this[int index] { get { throw null; } } - public System.Span this[System.Range range] { get { throw null; } } public int Length { get { throw null; } } public void Clear() { } public void CopyTo(System.Span destination) { } @@ -2254,10 +2242,8 @@ namespace System public static implicit operator System.ReadOnlySpan (System.Span span) { throw null; } public static implicit operator System.Span (T[] array) { throw null; } public static bool operator !=(System.Span left, System.Span right) { throw null; } - public System.Span Slice(System.Index startIndex) { throw null; } public System.Span Slice(int start) { throw null; } public System.Span Slice(int start, int length) { throw null; } - public System.Span Slice(System.Range range) { throw null; } public T[] ToArray() { throw null; } public override string ToString() { throw null; } public bool TryCopyTo(System.Span destination) { throw null; } @@ -2298,11 +2284,7 @@ namespace System [System.CLSCompliantAttribute(false)] public unsafe String(sbyte* value, int startIndex, int length, System.Text.Encoding enc) { } [System.Runtime.CompilerServices.IndexerName("Chars")] - public char this[System.Index index] { get { throw null; } } - [System.Runtime.CompilerServices.IndexerName("Chars")] public char this[int index] { get { throw null; } } - [System.Runtime.CompilerServices.IndexerName("Chars")] - public string this[System.Range range] { get { throw null; } } public int Length { get { throw null; } } public object Clone() { throw null; } public static int Compare(System.String strA, int indexA, System.String strB, int indexB, int length) { throw null; } @@ -2437,10 +2419,8 @@ namespace System public bool StartsWith(System.String value) { throw null; } public bool StartsWith(System.String value, bool ignoreCase, System.Globalization.CultureInfo culture) { throw null; } public bool StartsWith(System.String value, System.StringComparison comparisonType) { throw null; } - public System.String Substring(System.Index startIndex) { throw null; } public System.String Substring(int startIndex) { throw null; } public System.String Substring(int startIndex, int length) { throw null; } - public System.String Substring(System.Range range) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider provider) { throw null; } diff --git a/src/libraries/System.Runtime/tests/System/IndexTests.cs b/src/libraries/System.Runtime/tests/System/IndexTests.cs index 8f8d880..e7a0b50 100644 --- a/src/libraries/System.Runtime/tests/System/IndexTests.cs +++ b/src/libraries/System.Runtime/tests/System/IndexTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using Xunit; namespace System.Tests @@ -111,5 +112,23 @@ namespace System.Tests index1 = new Index(50, fromEnd: true); Assert.Equal("^" + 50.ToString(), index1.ToString()); } + + [Fact] + public static void CollectionTest() + { + int [] array = new int [] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + List list = new List(array); + + for (int i = 0; i < list.Count; i++) + { + Assert.Equal(i, list[Index.FromStart(i)]); + Assert.Equal(list.Count - i - 1, list[^(i + 1)]); + + Assert.Equal(i, array[Index.FromStart(i)]); + Assert.Equal(list.Count - i - 1, array[^(i + 1)]); + + Assert.Equal(array.AsSpan().Slice(i, array.Length - i).ToArray(), array[i..]); + } + } } } diff --git a/src/libraries/System.Runtime/tests/System/RangeTests.cs b/src/libraries/System.Runtime/tests/System/RangeTests.cs index 16002b8..4ea3791 100644 --- a/src/libraries/System.Runtime/tests/System/RangeTests.cs +++ b/src/libraries/System.Runtime/tests/System/RangeTests.cs @@ -103,5 +103,68 @@ namespace System.Tests range1 = new Range(new Index(10, fromEnd: false), new Index(20, fromEnd: true)); Assert.Equal(10.ToString() + "..^" + 20.ToString(), range1.ToString()); } + + [Fact] + public static void CustomTypeTest() + { + CustomRangeTester crt = new CustomRangeTester(new int [] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}); + for (int i = 0; i < crt.Length; i++) + { + Assert.Equal(crt[i], crt[Index.FromStart(i)]); + Assert.Equal(crt[crt.Length - i - 1], crt[^(i + 1)]); + + Assert.True(crt.Slice(i, crt.Length - i).Equals(crt[i..^0]), $"Index = {i} and {crt.Slice(i, crt.Length - i)} != {crt[i..^0]}"); + } + } + + // CustomRangeTester is a custom class which containing the members Length, Slice and int indexer. + // Having these members allow the C# compiler to support + // this[Index] + // this[Range] + private class CustomRangeTester : IEquatable + { + private int [] _data; + + public CustomRangeTester(int [] data) => _data = data; + public int Length => _data.Length; + public int this[int index] => _data[index]; + public CustomRangeTester Slice(int start, int length) => new CustomRangeTester(_data.AsSpan().Slice(start, length).ToArray()); + + public int [] Data => _data; + + public bool Equals (CustomRangeTester other) + { + if (_data.Length == other.Data.Length) + { + for (int i = 0; i < _data.Length; i++) + { + if (_data[i] != other.Data[i]) + { + return false; + } + } + return true; + } + + return false; + } + + public override string ToString() + { + if (Length == 0) + { + return "[]"; + } + + string s = "[" + _data[0]; + + for (int i = 1; i < Length; i++) + { + s = s + ", " + _data[i]; + } + + return s + "]"; + } + } } } diff --git a/src/libraries/System.Runtime/tests/System/StringTests.netcoreapp.cs b/src/libraries/System.Runtime/tests/System/StringTests.netcoreapp.cs index 35c0ed3..84be52a 100644 --- a/src/libraries/System.Runtime/tests/System/StringTests.netcoreapp.cs +++ b/src/libraries/System.Runtime/tests/System/StringTests.netcoreapp.cs @@ -1151,51 +1151,51 @@ namespace System.Tests Assert.Equal(expected, result); } - // [Fact] - // public static void IndexerUsingIndexTest() - // { - // Index index; - // string s = "0123456789ABCDEF"; - - // for (int i = 0; i < s.Length; i++) - // { - // index = Index.FromStart(i); - // Assert.Equal(s[i], s[index]); - - // index = Index.FromEnd(i + 1); - // Assert.Equal(s[s.Length - i - 1], s[index]); - // } - - // index = Index.FromStart(s.Length + 1); - // char c; - // Assert.Throws(() => c = s[index]); - - // index = Index.FromEnd(s.Length + 1); - // Assert.Throws(() => c = s[index]); - // } - - // [Fact] - // public static void IndexerUsingRangeTest() - // { - // Range range; - // string s = "0123456789ABCDEF"; - - // for (int i = 0; i < s.Length; i++) - // { - // range = new Range(Index.FromStart(0), Index.FromStart(i)); - // Assert.Equal(s.Substring(0, i), s[range]); - - // range = new Range(Index.FromEnd(s.Length), Index.FromEnd(i)); - // Assert.Equal(s.Substring(0, s.Length - i), s[range]); - // } - - // range = new Range(Index.FromStart(s.Length - 2), Index.FromStart(s.Length + 1)); - // string s1; - // Assert.Throws(() => s1 = s[range]); - - // range = new Range(Index.FromEnd(s.Length + 1), Index.FromEnd(0)); - // Assert.Throws(() => s1 = s[range]); - // } + [Fact] + public static void IndexerUsingIndexTest() + { + Index index; + string s = "0123456789ABCDEF"; + + for (int i = 0; i < s.Length; i++) + { + index = Index.FromStart(i); + Assert.Equal(s[i], s[index]); + + index = Index.FromEnd(i + 1); + Assert.Equal(s[s.Length - i - 1], s[index]); + } + + index = Index.FromStart(s.Length + 1); + char c; + Assert.Throws(() => c = s[index]); + + index = Index.FromEnd(s.Length + 1); + Assert.Throws(() => c = s[index]); + } + + [Fact] + public static void IndexerUsingRangeTest() + { + Range range; + string s = "0123456789ABCDEF"; + + for (int i = 0; i < s.Length; i++) + { + range = new Range(Index.FromStart(0), Index.FromStart(i)); + Assert.Equal(s.Substring(0, i), s[range]); + + range = new Range(Index.FromEnd(s.Length), Index.FromEnd(i)); + Assert.Equal(s.Substring(0, s.Length - i), s[range]); + } + + range = new Range(Index.FromStart(s.Length - 2), Index.FromStart(s.Length + 1)); + string s1; + Assert.Throws(() => s1 = s[range]); + + range = new Range(Index.FromEnd(s.Length + 1), Index.FromEnd(0)); + Assert.Throws(() => s1 = s[range]); + } [Fact] public static void SubstringUsingIndexTest() @@ -1204,15 +1204,15 @@ namespace System.Tests for (int i = 0; i < s.Length; i++) { - Assert.Equal(s.Substring(i), s.Substring(Index.FromStart(i))); - Assert.Equal(s.Substring(s.Length - i - 1), s.Substring(Index.FromEnd(i + 1))); + Assert.Equal(s.Substring(i), s[i..]); + Assert.Equal(s.Substring(s.Length - i - 1), s[^(i + 1)..]); } // String.Substring allows the string length as a valid input. - Assert.Equal(s.Substring(s.Length), s.Substring(Index.FromStart(s.Length))); + Assert.Equal(s.Substring(s.Length), s[s.Length..]); - Assert.Throws(() => s.Substring(Index.FromStart(s.Length + 1))); - Assert.Throws(() => s.Substring(Index.FromEnd(s.Length + 1))); + Assert.Throws(() => s[(s.Length + 1)..]); + Assert.Throws(() => s[^(s.Length + 1)..]); } [Fact] @@ -1224,18 +1224,18 @@ namespace System.Tests for (int i = 0; i < s.Length; i++) { range = new Range(Index.FromStart(0), Index.FromStart(i)); - Assert.Equal(s.Substring(0, i), s.Substring(range)); + Assert.Equal(s.Substring(0, i), s[range]); range = new Range(Index.FromEnd(s.Length), Index.FromEnd(i)); - Assert.Equal(s.Substring(0, s.Length - i), s.Substring(range)); + Assert.Equal(s.Substring(0, s.Length - i), s[range]); } range = new Range(Index.FromStart(s.Length - 2), Index.FromStart(s.Length + 1)); string s1; - Assert.Throws(() => s1 = s.Substring(range)); + Assert.Throws(() => s1 = s[range]); range = new Range(Index.FromEnd(s.Length + 1), Index.FromEnd(0)); - Assert.Throws(() => s1 = s.Substring(range)); + Assert.Throws(() => s1 = s[range]); } /// diff --git a/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.cs b/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.cs index 7e9bc8f..c330862 100644 --- a/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.cs +++ b/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.cs @@ -84,9 +84,7 @@ namespace System public static implicit operator ReadOnlySpan(Utf8String value) => throw null; public static bool operator ==(Utf8String left, Utf8String right) => throw null; public static bool operator !=(Utf8String left, Utf8String right) => throw null; - public Char8 this[Index index] => throw null; public Char8 this[int index] => throw null; - public Utf8String this[Range range] => throw null; public int Length => throw null; public bool Contains(char value) => throw null; public bool Contains(System.Text.Rune value) => throw null; @@ -101,12 +99,12 @@ namespace System public int IndexOf(char value) => throw null; public int IndexOf(System.Text.Rune value) => throw null; public static bool IsNullOrEmpty(Utf8String value) => throw null; + [ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] // for compiler use only + public Utf8String Slice(int startIndex, int length) => throw null; public bool StartsWith(char value) => throw null; public bool StartsWith(System.Text.Rune value) => throw null; - public Utf8String Substring(Index startIndex) => throw null; public Utf8String Substring(int startIndex) => throw null; public Utf8String Substring(int startIndex, int length) => throw null; - public Utf8String Substring(Range range) => throw null; public byte[] ToByteArray() => throw null; public byte[] ToByteArray(int startIndex, int length) => throw null; public override string ToString() => throw null; diff --git a/src/libraries/System.Utf8String.Experimental/tests/System/Utf8StringTests.Substring.cs b/src/libraries/System.Utf8String.Experimental/tests/System/Utf8StringTests.Substring.cs index b024dac..f17047c 100644 --- a/src/libraries/System.Utf8String.Experimental/tests/System/Utf8StringTests.Substring.cs +++ b/src/libraries/System.Utf8String.Experimental/tests/System/Utf8StringTests.Substring.cs @@ -29,16 +29,17 @@ namespace System.Tests void Substring_IndexCore(Utf8String s, Utf8String expected) { - Assert.Equal(expected, s.Substring(index)); + Range r = new Range(index, ^0); + Assert.Equal(expected, s[r]); if (index.Value == 0) { - Assert.Same(index.IsFromEnd ? Utf8String.Empty : s, s.Substring(index)); + Assert.Same(index.IsFromEnd ? Utf8String.Empty : s, s[r]); } if (index.Value == s.Length) { - Assert.Same(index.IsFromEnd ? s : Utf8String.Empty, s.Substring(index)); + Assert.Same(index.IsFromEnd ? s : Utf8String.Empty, s[r]); } }; @@ -88,18 +89,15 @@ namespace System.Tests { void Substring_RangeCore(Utf8String s, Range range, Utf8String expected) { - Assert.Equal(expected, s.Substring(range)); Assert.Equal(expected, s[range]); if (expected.Length == s.Length) { - Assert.Same(s, s.Substring(range)); Assert.Same(s, s[range]); } if (expected.Length == 0) { - Assert.Same(Utf8String.Empty, s.Substring(range)); Assert.Same(Utf8String.Empty, s[range]); } }; diff --git a/src/libraries/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt b/src/libraries/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt index ccdfc78..b038da4 100644 --- a/src/libraries/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt +++ b/src/libraries/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt @@ -60,4 +60,23 @@ CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xm CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Range.OffsetAndLength' does not exist in the implementation but it does exist in the contract. -Total Issues: 61 +MembersMustExist : Member 'System.Memory.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Memory.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Memory.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlyMemory.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlyMemory.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlyMemory.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Item.get(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Item.get(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Chars.get(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Chars.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Substring(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Substring(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Utf8String.Slice(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. +Total Issues: 80 diff --git a/src/libraries/shims/ApiCompatBaseline.uap.netstandardOnly.txt b/src/libraries/shims/ApiCompatBaseline.uap.netstandardOnly.txt index 5c7a092..5d2d287 100644 --- a/src/libraries/shims/ApiCompatBaseline.uap.netstandardOnly.txt +++ b/src/libraries/shims/ApiCompatBaseline.uap.netstandardOnly.txt @@ -63,4 +63,23 @@ CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xm CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Range.OffsetAndLength' does not exist in the implementation but it does exist in the contract. -Total Issues: 64 +MembersMustExist : Member 'System.Memory.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Memory.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Memory.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlyMemory.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlyMemory.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlyMemory.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Item.get(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.ReadOnlySpan.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Item.get(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Span.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Chars.get(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Chars.get(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Substring(System.Index)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.String.Substring(System.Range)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Utf8String.Slice(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. +Total Issues: 83 -- 2.7.4