1 override of Empty
Microsoft.CodeAnalysis.UnitTests (1)
Collections\ImmutableSegmentedHashSetTest.cs (1)
215
protected override System.Collections.Immutable.IImmutableSet<T>
Empty
<T>()
41 references to Empty
Microsoft.CodeAnalysis.UnitTests (41)
Collections\ImmutableSetTest.cs (32)
28
AddTestHelper(this.
Empty
<int>(), 3, 5, 4, 3);
35
AddTestHelper(this.
Empty
<int>(), arrayWithDuplicates);
41
RemoveTestHelper(this.
Empty
<int>().Add(3).Add(5), 5, 3);
48
AddRemoveLoadTestHelper(
Empty
<double>(), data);
54
System.Collections.Immutable.IImmutableSet<int> emptySet = this.
Empty
<int>();
76
var set = this.
Empty
<int>().Add(5);
77
var empty2 = this.
Empty
<int>();
96
Empty
<int>().Except(Enumerable.Range(1, 1).Select(n => { enumerated = true; return n; }));
103
Assert.True(this.
Empty
<int>().SetEquals(this.
Empty
<int>()));
104
var nonEmptySet = this.
Empty
<int>().Add(5);
143
Assert.False(
Empty
<int>().Equals(null));
144
Assert.False(
Empty
<int>().Equals("hi"));
145
Assert.True(
Empty
<int>().Equals(
Empty
<int>()));
146
Assert.False(
Empty
<int>().Add(3).Equals(
Empty
<int>().Add(3)));
147
Assert.False(
Empty
<int>().Add(5).Equals(
Empty
<int>().Add(3)));
148
Assert.False(
Empty
<int>().Add(3).Add(5).Equals(
Empty
<int>().Add(3)));
149
Assert.False(
Empty
<int>().Add(3).Equals(
Empty
<int>().Add(3).Add(5)));
156
Assert.Equal(EqualityComparer<object>.Default.GetHashCode(
Empty
<int>()),
Empty
<int>().GetHashCode());
162
var originalSet = this.
Empty
<int>();
171
var set = (ISet<int>)this.
Empty
<int>();
182
var set = (ICollection<int>)this.
Empty
<int>();
192
ICollection builder = (ICollection)this.
Empty
<string>();
196
builder = (ICollection)this.
Empty
<string>().Add("a");
210
var empty = this.
Empty
<string?>();
254
return this.
Empty
<T>().Union(items);
Collections\ImmutableSetTest.nonnetstandard.cs (9)
25
ExceptTestHelper(
Empty
<int>().Add(1).Add(3).Add(5).Add(7), 3, 7);
31
SymmetricExceptTestHelper(
Empty
<int>().Add(1).Add(3).Add(5).Add(7), Enumerable.Range(0, 9).ToArray());
32
SymmetricExceptTestHelper(
Empty
<int>().Add(1).Add(3).Add(5).Add(7), Enumerable.Range(0, 5).ToArray());
38
var set = this.
Empty
<double>();
49
IntersectTestHelper(
Empty
<int>().Union(Enumerable.Range(1, 10)), 8, 3, 5);
55
UnionTestHelper(this.
Empty
<int>(), new[] { 1, 3, 5, 7 });
56
UnionTestHelper(this.
Empty
<int>().Union(new[] { 2, 4, 6 }), new[] { 1, 3, 5, 7 });
57
UnionTestHelper(this.
Empty
<int>().Union(new[] { 1, 2, 3 }), Array.Empty<int>());
58
UnionTestHelper(this.
Empty
<int>().Union(new[] { 2 }), Enumerable.Range(0, 1000).ToArray());