20 references to IsSame
Microsoft.CodeAnalysis.UnitTests (20)
Collections\ImmutableDictionaryTestBase.cs (6)
54
Assert.True(
IsSame
(map, sameMap));
240
Assert.True(
IsSame
(empty, empty.Clear()));
262
Assert.True(
IsSame
(map, map.Add(key, value2)));
263
Assert.True(
IsSame
(map, map.AddRange(new[] { new KeyValuePair<TKey, TValue>(key, value2) })));
311
Assert.True(
IsSame
(map, map.Remove(key)));
312
Assert.True(
IsSame
(map, map.RemoveRange(Enumerable.Empty<TKey>())));
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (5)
98
Assert.True(
IsSame
(map, jointMap));
101
Assert.True(
IsSame
(map, jointMap));
104
Assert.True(
IsSame
(map, jointMap));
198
Assert.True(
IsSame
(empty, empty.RemoveRange(Enumerable.Empty<int>())));
199
Assert.True(
IsSame
(empty, empty.AddRange(Enumerable.Empty<KeyValuePair<int, int>>())));
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (6)
84
Assert.True(
IsSame
(immutable1, mutable.ToImmutable())); // "The Immutable property getter is creating new objects without any differences."
88
Assert.False(
IsSame
(immutable1, immutable2)); // "Mutating the collection did not reset the Immutable property."
89
Assert.True(
IsSame
(immutable2, mutable.ToImmutable())); // "The Immutable property getter is creating new objects without any differences."
128
Assert.True(
IsSame
(collection, builder.ToImmutable())); // no changes at all.
132
Assert.False(
IsSame
(collection, newImmutable)); // first ToImmutable with changes should be a new instance.
133
Assert.True(
IsSame
(newImmutable, builder.ToImmutable())); // second ToImmutable without changes should be the same instance.
Collections\ImmutableSegmentedDictionaryTest.cs (3)
163
Assert.True(
IsSame
(dictionary, result));
273
Assert.True(
IsSame
(ImmutableSegmentedDictionary<string, int>.Empty, dictionary.Clear()));
286
Assert.False(
IsSame
(ImmutableSegmentedDictionary<string, int>.Empty, clearedDictionary.Clear()));