20 references to IsSame
Microsoft.CodeAnalysis.UnitTests (20)
Collections\ImmutableDictionaryTestBase.cs (6)
54Assert.True(IsSame(map, sameMap)); 240Assert.True(IsSame(empty, empty.Clear())); 262Assert.True(IsSame(map, map.Add(key, value2))); 263Assert.True(IsSame(map, map.AddRange(new[] { new KeyValuePair<TKey, TValue>(key, value2) }))); 311Assert.True(IsSame(map, map.Remove(key))); 312Assert.True(IsSame(map, map.RemoveRange(Enumerable.Empty<TKey>())));
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (5)
98Assert.True(IsSame(map, jointMap)); 101Assert.True(IsSame(map, jointMap)); 104Assert.True(IsSame(map, jointMap)); 198Assert.True(IsSame(empty, empty.RemoveRange(Enumerable.Empty<int>()))); 199Assert.True(IsSame(empty, empty.AddRange(Enumerable.Empty<KeyValuePair<int, int>>())));
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (6)
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." 128Assert.True(IsSame(collection, builder.ToImmutable())); // no changes at all. 132Assert.False(IsSame(collection, newImmutable)); // first ToImmutable with changes should be a new instance. 133Assert.True(IsSame(newImmutable, builder.ToImmutable())); // second ToImmutable without changes should be the same instance.
Collections\ImmutableSegmentedDictionaryTest.cs (3)
163Assert.True(IsSame(dictionary, result)); 273Assert.True(IsSame(ImmutableSegmentedDictionary<string, int>.Empty, dictionary.Clear())); 286Assert.False(IsSame(ImmutableSegmentedDictionary<string, int>.Empty, clearedDictionary.Clear()));