17 references to IsSame
Microsoft.CodeAnalysis.UnitTests (17)
Collections\ImmutableSegmentedListBuilderTest.cs (5)
84Assert.True(IsSame(immutable1, mutable.ToImmutable())); //, "The Immutable property getter is creating new objects without any differences."); 88Assert.False(IsSame(immutable1, immutable2)); //, "Mutating the collection did not reset the Immutable property."); 89Assert.True(IsSame(immutable2, mutable.ToImmutable())); //, "The Immutable property getter is creating new objects without any differences."); 124Assert.False(IsSame(collection, newImmutable)); // first ToImmutable with changes should be a new instance. 125Assert.True(IsSame(newImmutable, builder.ToImmutable())); // second ToImmutable without changes should be the same instance.
Collections\ImmutableSegmentedListTest.cs (12)
108Assert.True(IsSame(empty, ImmutableSegmentedList<GenericParameterHelper>.Empty)); 109Assert.True(IsSame(empty, empty.Clear())); 110Assert.True(IsSame(empty, ((System.Collections.Immutable.IImmutableList<GenericParameterHelper>)empty).Clear())); 173Assert.True(IsSame(emptyList, emptyList.AddRange(new string[0]))); 177Assert.True(IsSame(nonEmptyListDefaultComparer, emptyList.AddRange(nonEmptyListDefaultComparer))); 181Assert.True(IsSame(nonEmptyListDefaultComparer, emptyList.AddRange(builderOfNonEmptyListDefaultComparer))); 397Assert.True(IsSame(list, list.Remove(3))); 551Assert.False(IsSame(list, updatedList)); 606Assert.True(IsSame(list, list.ToImmutableSegmentedList())); 653Assert.True(IsSame(list, list.RemoveRange(new[] { 5 }))); 654Assert.True(IsSame(ImmutableSegmentedList.Create<int>(), ImmutableSegmentedList.Create<int>().RemoveRange(new[] { 1 }))); 715Assert.True(IsSame(emptyList, emptyList.Reverse()));