From 00066df601206ec145b16c0a38e0f7b7628bd2f5 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Thu, 8 Nov 2018 18:21:08 -0800 Subject: [PATCH 1/6] Expose Index and Range with adding tests --- src/System.Memory/tests/Span/Indexer.cs | 70 +++++++++++++++++++ .../tests/System.Memory.Tests.csproj | 4 ++ src/System.Runtime/ref/System.Runtime.cs | 25 ++++++- .../tests/System.Runtime.Tests.csproj | 2 + src/System.Runtime/tests/System/IndexTests.cs | 34 +++++++++ src/System.Runtime/tests/System/RangeTests.cs | 40 +++++++++++ 6 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 src/System.Memory/tests/Span/Indexer.cs create mode 100644 src/System.Runtime/tests/System/IndexTests.cs create mode 100644 src/System.Runtime/tests/System/RangeTests.cs diff --git a/src/System.Memory/tests/Span/Indexer.cs b/src/System.Memory/tests/Span/Indexer.cs new file mode 100644 index 000000000000..abd1e39b1891 --- /dev/null +++ b/src/System.Memory/tests/Span/Indexer.cs @@ -0,0 +1,70 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Numerics; +using Xunit; + +namespace System.SpanTests +{ + public static partial class IndexerTests + { + [Fact] + public static void IndexerWithIndexTest() + { + ReadOnlySpan span = "Hello".AsSpan(); + Assert.Equal('H', span[new Index(0, fromEnd: false)]); + Assert.Equal('o', span[new Index(1, fromEnd: true)]); + Assert.Equal(span[new Index(2, fromEnd: false)], span[new Index(span.Length - 2, fromEnd: true)]); + + Assert.Throws(() => + { + char c; + ReadOnlySpan s = "Hello".AsSpan(); + c = s[new Index(0, fromEnd: true)]; + return; + }); + + Span span1 = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); + Assert.Equal('e', span1[new Index(1, fromEnd: false)]); + Assert.Equal('l', span1[new Index(2, fromEnd: true)]); + Assert.Equal(span1[new Index(2, fromEnd: false)], span1[new Index(span.Length - 2, fromEnd: true)]); + + Assert.Throws(() => + { + char c; + Span s = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); + c = s[new Index(0, fromEnd: true)]; + return; + }); + } + + [Fact] + public static void IndexerWithRangeTest() + { + ReadOnlySpan span = "Hello".AsSpan(); + ReadOnlySpan sliced = span[Range.Create(new Index(1, fromEnd: false), new Index(1, fromEnd: true))]; + Assert.True(span.Slice(1, 3) == sliced); + + Assert.Throws(() => + { + ReadOnlySpan s = "Hello".AsSpan(); + // Passing wrong start and end to the Range + ReadOnlySpan s1 = s[Range.Create(new Index(1, fromEnd: true), new Index(1, fromEnd: false))]; + return; + }); + + Span span1 = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); + Span sliced1 = span1[Range.Create(new Index(2, fromEnd: false), new Index(1, fromEnd: true))]; + Assert.True(span1.Slice(2, 2) == sliced1); + + Assert.Throws(() => + { + Span s = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); + // Passing wrong start and end to the Range + Span s1 = s[Range.Create(new Index(0, fromEnd: true), new Index(1, fromEnd: false))]; + return; + }); + } + } +} \ No newline at end of file diff --git a/src/System.Memory/tests/System.Memory.Tests.csproj b/src/System.Memory/tests/System.Memory.Tests.csproj index a8753e5a5cbd..a35d39efe95d 100644 --- a/src/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/System.Memory/tests/System.Memory.Tests.csproj @@ -228,6 +228,10 @@ + + + + diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index f8d998dffc63..35994211fbd2 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -985,6 +985,25 @@ void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(obj public static bool TryParse(string s, out System.Decimal result) { throw null; } public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Decimal result) { throw null; } } + public readonly partial struct Index + { + private readonly int _dummyPrimitive; + public int Value { get { throw null; } } + public bool FromEnd { get { throw null; } } + public Index(int value, bool fromEnd) { throw null; } + public static implicit operator Index(int value) { throw null; } + } + public readonly partial struct Range + { + private readonly int _dummyPrimitive; + public Index Start { get { throw null; } } + public Index End { get { throw null; } } + public static Range Create(Index start, Index end) { throw null; } + public static Range FromStart(Index start) { throw null; } + public static Range ToEnd(Index end) { throw null; } + public static Range All() { throw null; } + } + public abstract partial class Delegate : System.ICloneable, System.Runtime.Serialization.ISerializable { protected Delegate(object target, string method) { } @@ -1983,6 +2002,8 @@ public readonly ref partial struct ReadOnlySpan public static System.ReadOnlySpan Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } public ref readonly T this[int index] { get { throw null; } } + public T this[Index index] { get { throw null; } } + public ReadOnlySpan this[Range range] { get { throw null; } } public int Length { get { throw null; } } public void CopyTo(System.Span destination) { } [System.ComponentModel.EditorBrowsableAttribute((System.ComponentModel.EditorBrowsableState)(1))] @@ -2185,6 +2206,8 @@ public readonly ref partial struct Span public static System.Span Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } public ref T this[int index] { get { throw null; } } + public T this[Index index] { get { throw null; } } + public Span this[Range range] { get { throw null; } } public int Length { get { throw null; } } public void Clear() { } public void CopyTo(System.Span destination) { } @@ -7003,7 +7026,7 @@ public StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind layoutKin namespace System.Runtime.Remoting { public class ObjectHandle : MarshalByRefObject - { + { private ObjectHandle() { } public ObjectHandle(Object o) { } public Object Unwrap() { throw null; } diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj index b7ef8c0ed662..3500a919bb88 100644 --- a/src/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj @@ -221,12 +221,14 @@ + + diff --git a/src/System.Runtime/tests/System/IndexTests.cs b/src/System.Runtime/tests/System/IndexTests.cs new file mode 100644 index 000000000000..6bc62219080f --- /dev/null +++ b/src/System.Runtime/tests/System/IndexTests.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using Xunit; + +namespace System.Tests +{ + public static class IndexTests + { + [Fact] + public static void CreationTest() + { + Index index = new Index(1, fromEnd: false); + Assert.Equal(1, index.Value); + Assert.False(index.FromEnd); + + index = new Index(11, fromEnd: true); + Assert.Equal(11, index.Value); + Assert.True(index.FromEnd); + + AssertExtensions.Throws("value", () => new Index(-1, fromEnd: false)); + } + + [Fact] + public static void ImplicitCastTest() + { + Index index = 10; + Assert.Equal(10, index.Value); + Assert.False(index.FromEnd); + } + } +} diff --git a/src/System.Runtime/tests/System/RangeTests.cs b/src/System.Runtime/tests/System/RangeTests.cs new file mode 100644 index 000000000000..5a7533cbc0cf --- /dev/null +++ b/src/System.Runtime/tests/System/RangeTests.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using Xunit; + +namespace System.Tests +{ + public static class RangeTests + { + [Fact] + public static void CreationTest() + { + Range range = Range.Create(new Index(10, fromEnd: false), new Index(2, fromEnd: true)); + Assert.Equal(10, range.Start.Value); + Assert.False(range.Start.FromEnd); + Assert.Equal(2, range.End.Value); + Assert.True(range.End.FromEnd); + + range = Range.FromStart(new Index(7, fromEnd: false)); + Assert.Equal(7, range.Start.Value); + Assert.False(range.Start.FromEnd); + Assert.Equal(0, range.End.Value); + Assert.True(range.End.FromEnd); + + range = Range.ToEnd(new Index(3, fromEnd: true)); + Assert.Equal(0, range.Start.Value); + Assert.False(range.Start.FromEnd); + Assert.Equal(3, range.End.Value); + Assert.True(range.End.FromEnd); + + range = Range.All(); + Assert.Equal(0, range.Start.Value); + Assert.False(range.Start.FromEnd); + Assert.Equal(0, range.End.Value); + Assert.True(range.End.FromEnd); + } + } +} From 3953dd5f6f4aa82b22963afbc60cc92b55a22a9f Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 9 Nov 2018 14:26:50 -0800 Subject: [PATCH 2/6] More tests and more exposed APIs --- src/System.Runtime/ref/System.Runtime.cs | 12 ++++-- src/System.Runtime/tests/System/IndexTests.cs | 40 ++++++++++++++++++- src/System.Runtime/tests/System/RangeTests.cs | 38 ++++++++++++++++++ 3 files changed, 86 insertions(+), 4 deletions(-) diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 35994211fbd2..96681c042a2b 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -988,9 +988,12 @@ void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(obj public readonly partial struct Index { private readonly int _dummyPrimitive; + public Index(int value, bool fromEnd) { throw null; } public int Value { get { throw null; } } public bool FromEnd { get { throw null; } } - public Index(int value, bool fromEnd) { throw null; } + public override bool Equals(object value) { throw null; } + public override int GetHashCode() { throw null; } + public override string ToString() { throw null; } public static implicit operator Index(int value) { throw null; } } public readonly partial struct Range @@ -998,6 +1001,9 @@ public readonly partial struct Range private readonly int _dummyPrimitive; public Index Start { get { throw null; } } public Index End { get { throw null; } } + public override bool Equals(object value) { throw null; } + public override int GetHashCode() { throw null; } + public override string ToString() { throw null; } public static Range Create(Index start, Index end) { throw null; } public static Range FromStart(Index start) { throw null; } public static Range ToEnd(Index end) { throw null; } @@ -2002,7 +2008,7 @@ public readonly ref partial struct ReadOnlySpan public static System.ReadOnlySpan Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } public ref readonly T this[int index] { get { throw null; } } - public T this[Index index] { get { throw null; } } + public ref readonly T this[Index index] { get { throw null; } } public ReadOnlySpan this[Range range] { get { throw null; } } public int Length { get { throw null; } } public void CopyTo(System.Span destination) { } @@ -2206,7 +2212,7 @@ public readonly ref partial struct Span public static System.Span Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } public ref T this[int index] { get { throw null; } } - public T this[Index index] { get { throw null; } } + public ref readonly T this[Index index] { get { throw null; } } public Span this[Range range] { get { throw null; } } public int Length { get { throw null; } } public void Clear() { } diff --git a/src/System.Runtime/tests/System/IndexTests.cs b/src/System.Runtime/tests/System/IndexTests.cs index 6bc62219080f..c739a31334cd 100644 --- a/src/System.Runtime/tests/System/IndexTests.cs +++ b/src/System.Runtime/tests/System/IndexTests.cs @@ -20,7 +20,7 @@ public static void CreationTest() Assert.Equal(11, index.Value); Assert.True(index.FromEnd); - AssertExtensions.Throws("value", () => new Index(-1, fromEnd: false)); + AssertExtensions.Throws("value", () => new Index(-1, fromEnd: false)); } [Fact] @@ -30,5 +30,43 @@ public static void ImplicitCastTest() Assert.Equal(10, index.Value); Assert.False(index.FromEnd); } + + [Fact] + public static void EqualityTest() + { + Index index1 = 10; + Index index2 = 10; + Assert.True(index1.Equals(index2)); + + index2 = new Index(10, fromEnd: true); + Assert.False(index1.Equals(index2)); + + index2 = new Index(9, fromEnd: false); + Assert.False(index1.Equals(index2)); + } + + [Fact] + public static void HashCodeTest() + { + Index index1 = 10; + Index index2 = 10; + Assert.Equal(index1.GetHashCode(), index2.GetHashCode()); + + index2 = new Index(10, fromEnd: true); + Assert.NotEqual(index1.GetHashCode(), index2.GetHashCode()); + + index2 = new Index(99999, fromEnd: false); + Assert.NotEqual(index1.GetHashCode(), index2.GetHashCode()); + } + + [Fact] + public static void ToStringTest() + { + Index index1 = 100; + Assert.Equal(100.ToString(), index1.ToString()); + + index1 = new Index(50, fromEnd: true); + Assert.Equal("^" + 50.ToString(), index1.ToString()); + } } } diff --git a/src/System.Runtime/tests/System/RangeTests.cs b/src/System.Runtime/tests/System/RangeTests.cs index 5a7533cbc0cf..11c2c347e056 100644 --- a/src/System.Runtime/tests/System/RangeTests.cs +++ b/src/System.Runtime/tests/System/RangeTests.cs @@ -36,5 +36,43 @@ public static void CreationTest() Assert.Equal(0, range.End.Value); Assert.True(range.End.FromEnd); } + + [Fact] + public static void EqualityTest() + { + Range range1 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); + Range range2 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); + Assert.True(range1.Equals(range2)); + + range2 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: true)); + Assert.False(range1.Equals(range2)); + + range2 = Range.Create(new Index(10, fromEnd: false), new Index(21, fromEnd: false)); + Assert.False(range1.Equals(range2)); + } + + [Fact] + public static void HashCodeTest() + { + Range range1 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); + Range range2 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); + Assert.Equal(range1.GetHashCode(), range2.GetHashCode()); + + range2 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: true)); + Assert.NotEqual(range1.GetHashCode(), range2.GetHashCode()); + + range2 = Range.Create(new Index(10, fromEnd: false), new Index(21, fromEnd: false)); + Assert.NotEqual(range1.GetHashCode(), range2.GetHashCode()); + } + + [Fact] + public static void ToStringTest() + { + Range range1 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); + Assert.Equal(10.ToString() + ".." + 20.ToString(), range1.ToString()); + + range1 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: true)); + Assert.Equal(10.ToString() + "..^" + 20.ToString(), range1.ToString()); + } } } From 1564fde649d349217118528feec52d0f46ebba30 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 9 Nov 2018 16:56:31 -0800 Subject: [PATCH 3/6] More changes --- src/System.Runtime/ref/System.Runtime.cs | 8 +++++--- src/System.Runtime/tests/System/IndexTests.cs | 3 +++ src/System.Runtime/tests/System/RangeTests.cs | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 96681c042a2b..a7b9efa3ea0c 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -985,23 +985,25 @@ void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(obj public static bool TryParse(string s, out System.Decimal result) { throw null; } public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Decimal result) { throw null; } } - public readonly partial struct Index + public readonly partial struct Index : System.IEquatable { private readonly int _dummyPrimitive; public Index(int value, bool fromEnd) { throw null; } public int Value { get { throw null; } } public bool FromEnd { get { throw null; } } public override bool Equals(object value) { throw null; } + public bool Equals(Index other) { throw null; } public override int GetHashCode() { throw null; } public override string ToString() { throw null; } public static implicit operator Index(int value) { throw null; } } - public readonly partial struct Range + public readonly partial struct Range : System.IEquatable { private readonly int _dummyPrimitive; public Index Start { get { throw null; } } public Index End { get { throw null; } } public override bool Equals(object value) { throw null; } + public bool Equals(Range other) { throw null; } public override int GetHashCode() { throw null; } public override string ToString() { throw null; } public static Range Create(Index start, Index end) { throw null; } @@ -2212,7 +2214,7 @@ public readonly ref partial struct Span public static System.Span Empty { get { throw null; } } public bool IsEmpty { get { throw null; } } public ref T this[int index] { get { throw null; } } - public ref readonly T this[Index index] { get { throw null; } } + public ref T this[Index index] { get { throw null; } } public Span this[Range range] { get { throw null; } } public int Length { get { throw null; } } public void Clear() { } diff --git a/src/System.Runtime/tests/System/IndexTests.cs b/src/System.Runtime/tests/System/IndexTests.cs index c739a31334cd..330a741f67a8 100644 --- a/src/System.Runtime/tests/System/IndexTests.cs +++ b/src/System.Runtime/tests/System/IndexTests.cs @@ -37,12 +37,15 @@ public static void EqualityTest() Index index1 = 10; Index index2 = 10; Assert.True(index1.Equals(index2)); + Assert.True(index1.Equals((object)index2)); index2 = new Index(10, fromEnd: true); Assert.False(index1.Equals(index2)); + Assert.False(index1.Equals((object)index2)); index2 = new Index(9, fromEnd: false); Assert.False(index1.Equals(index2)); + Assert.False(index1.Equals((object)index2)); } [Fact] diff --git a/src/System.Runtime/tests/System/RangeTests.cs b/src/System.Runtime/tests/System/RangeTests.cs index 11c2c347e056..7ac420ae3d76 100644 --- a/src/System.Runtime/tests/System/RangeTests.cs +++ b/src/System.Runtime/tests/System/RangeTests.cs @@ -43,12 +43,15 @@ public static void EqualityTest() Range range1 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); Range range2 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: false)); Assert.True(range1.Equals(range2)); + Assert.True(range1.Equals((object)range2)); range2 = Range.Create(new Index(10, fromEnd: false), new Index(20, fromEnd: true)); Assert.False(range1.Equals(range2)); + Assert.False(range1.Equals((object)range2)); range2 = Range.Create(new Index(10, fromEnd: false), new Index(21, fromEnd: false)); Assert.False(range1.Equals(range2)); + Assert.False(range1.Equals((object)range2)); } [Fact] From bf2e57486b1670f4c1ed5f9aed4d550d6b2617e1 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 9 Nov 2018 19:02:51 -0800 Subject: [PATCH 4/6] address feedback --- src/System.Memory/tests/Span/Indexer.cs | 29 ++++--------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/System.Memory/tests/Span/Indexer.cs b/src/System.Memory/tests/Span/Indexer.cs index abd1e39b1891..6153770456ba 100644 --- a/src/System.Memory/tests/Span/Indexer.cs +++ b/src/System.Memory/tests/Span/Indexer.cs @@ -17,13 +17,7 @@ public static void IndexerWithIndexTest() Assert.Equal('o', span[new Index(1, fromEnd: true)]); Assert.Equal(span[new Index(2, fromEnd: false)], span[new Index(span.Length - 2, fromEnd: true)]); - Assert.Throws(() => - { - char c; - ReadOnlySpan s = "Hello".AsSpan(); - c = s[new Index(0, fromEnd: true)]; - return; - }); + Assert.Throws(() => "Hello".AsSpan()[new Index(0, fromEnd: true)]); Span span1 = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); Assert.Equal('e', span1[new Index(1, fromEnd: false)]); @@ -31,12 +25,7 @@ public static void IndexerWithIndexTest() Assert.Equal(span1[new Index(2, fromEnd: false)], span1[new Index(span.Length - 2, fromEnd: true)]); Assert.Throws(() => - { - char c; - Span s = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); - c = s[new Index(0, fromEnd: true)]; - return; - }); + new Span(new char [] { 'H', 'e', 'l', 'l', 'o'})[new Index(0, fromEnd: true)]); } [Fact] @@ -47,24 +36,14 @@ public static void IndexerWithRangeTest() Assert.True(span.Slice(1, 3) == sliced); Assert.Throws(() => - { - ReadOnlySpan s = "Hello".AsSpan(); - // Passing wrong start and end to the Range - ReadOnlySpan s1 = s[Range.Create(new Index(1, fromEnd: true), new Index(1, fromEnd: false))]; - return; - }); + { ReadOnlySpan s = "Hello".AsSpan()[Range.Create(new Index(1, fromEnd: true), new Index(1, fromEnd: false))]; }); Span span1 = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); Span sliced1 = span1[Range.Create(new Index(2, fromEnd: false), new Index(1, fromEnd: true))]; Assert.True(span1.Slice(2, 2) == sliced1); Assert.Throws(() => - { - Span s = new Span(new char [] { 'H', 'e', 'l', 'l', 'o'}); - // Passing wrong start and end to the Range - Span s1 = s[Range.Create(new Index(0, fromEnd: true), new Index(1, fromEnd: false))]; - return; - }); + { Span s = new Span(new char [] { 'H', 'i' })[Range.Create(new Index(0, fromEnd: true), new Index(1, fromEnd: false))]; }); } } } \ No newline at end of file From 4fde6ee849205eacecbc7c270d1dca5789bde24a Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Sat, 10 Nov 2018 12:11:30 -0800 Subject: [PATCH 5/6] Fix ApiCompat break --- src/System.Memory/src/ApiCompatBaseline.netcoreappaot.txt | 5 +++++ src/System.Runtime/src/ApiCompatBaseline.netcoreappaot.txt | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 src/System.Memory/src/ApiCompatBaseline.netcoreappaot.txt diff --git a/src/System.Memory/src/ApiCompatBaseline.netcoreappaot.txt b/src/System.Memory/src/ApiCompatBaseline.netcoreappaot.txt new file mode 100644 index 000000000000..0898018176df --- /dev/null +++ b/src/System.Memory/src/ApiCompatBaseline.netcoreappaot.txt @@ -0,0 +1,5 @@ +Compat issues with assembly System.Memory: +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.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. diff --git a/src/System.Runtime/src/ApiCompatBaseline.netcoreappaot.txt b/src/System.Runtime/src/ApiCompatBaseline.netcoreappaot.txt index 55e3ce73fc35..58bb211057db 100644 --- a/src/System.Runtime/src/ApiCompatBaseline.netcoreappaot.txt +++ b/src/System.Runtime/src/ApiCompatBaseline.netcoreappaot.txt @@ -3,3 +3,9 @@ MembersMustExist : Member 'System.String System.Runtime.CompilerServices.Runtime TypeCannotChangeClassification : Type 'System.DateTimeOffset' is marked as readonly in the contract so it must also be marked readonly in the implementation. TypeCannotChangeClassification : Type 'System.TimeSpan' is marked as readonly in the contract so it must also be marked readonly in the implementation. TypeCannotChangeClassification : Type 'System.Runtime.Serialization.SerializationEntry' is marked as readonly in the contract so it must also be marked readonly in the implementation. +TypesMustExist : Type 'System.Index' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type '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.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. From 92f7b8f6dd66df63df2941a3e6ee6ea59f0eb204 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Sat, 10 Nov 2018 12:29:36 -0800 Subject: [PATCH 6/6] Fix UAPAOT app compat --- src/System.Runtime/src/ApiCompatBaseline.uapaot.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/System.Runtime/src/ApiCompatBaseline.uapaot.txt diff --git a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt new file mode 100644 index 000000000000..8ef10fce3936 --- /dev/null +++ b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt @@ -0,0 +1,6 @@ +TypesMustExist : Type 'System.Index' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type '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.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.