17 references to IsSame
Microsoft.CodeAnalysis.UnitTests (17)
Collections\ImmutableSegmentedHashSetBuilderTest.cs (3)
105Assert.True(IsSame(collection, builder.ToImmutable())); // no changes at all. 109Assert.False(IsSame(collection, newImmutable)); // first ToImmutable with changes should be a new instance. 110Assert.True(IsSame(newImmutable, builder.ToImmutable())); // second ToImmutable without changes should be the same instance.
Collections\ImmutableSegmentedHashSetTest.cs (2)
162Assert.True(IsSame(set, set.Remove(2))); 177Assert.True(IsSame(set, set.Remove("c")));
Collections\ImmutableSegmentedHashSetTest.nonnetstandard.cs (3)
45Assert.True(IsSame(emptySet, emptySet.ToImmutableSegmentedHashSet(comparer))); 50Assert.True(IsSame(emptySet, ImmutableSegmentedHashSet<T>.Empty)); 54Assert.True(IsSame(reemptied, reemptied.ToImmutableSegmentedHashSet(comparer))); //, "Getting the empty set from a non-empty instance did not preserve the comparer.");
Collections\ImmutableSetTest.cs (9)
55Assert.True(IsSame(emptySet, emptySet.Remove(5))); 69Assert.True(IsSame(set, setAfterRemoval)); 78Assert.True(IsSame(set, empty2.Union(set))); // "Filling an empty immutable set with the contents of another immutable set with the exact same comparer should return the other set." 165Assert.True(IsSame(originalSet, clearedSet)); 291Assert.True(IsSame(emptySet, emptySet.Clear())); 392Assert.True(IsSame(set, set.Except(Enumerable.Empty<T>()))); 403Assert.True(IsSame(nextSet, nextSet.Remove(value))); //, "Removing a non-existing element should not change the set reference."); 488Assert.True(IsSame(set, set.Union(Enumerable.Empty<T>()))); 521Assert.True(IsSame(nextSet, nextSet.Add(value))); //, "Adding duplicate value {0} should keep the original reference.", value);