3 overrides of GetIComparer
Microsoft.CodeAnalysis.UnitTests (3)
Collections\HashSet\SegmentedHashSet_Generic_Tests.cs (3)
47
protected override IComparer<int>
GetIComparer
()
71
protected override IComparer<SimpleInt>
GetIComparer
()
147
protected override IComparer<int>
GetIComparer
()
15 references to GetIComparer
Microsoft.CodeAnalysis.UnitTests (15)
Collections\List\SegmentedList.Generic.Tests.BinarySearch.cs (6)
37
Assert.Equal(index, list.BinarySearch(beforeList[index],
GetIComparer
()));
56
Assert.True(list.BinarySearch(beforeList[index],
GetIComparer
()) >= 0);
69
Assert.Throws<ArgumentException>(null, () => list.BinarySearch(0, count + 1, element,
GetIComparer
())); //"Finding items longer than array should throw ArgumentException"
70
Assert.Throws<ArgumentOutOfRangeException>(() => list.BinarySearch(-1, count, element,
GetIComparer
())); //"ArgumentOutOfRangeException should be thrown on negative index."
71
Assert.Throws<ArgumentOutOfRangeException>(() => list.BinarySearch(0, -1, element,
GetIComparer
())); //"ArgumentOutOfRangeException should be thrown on negative count."
72
Assert.Throws<ArgumentException>(null, () => list.BinarySearch(count + 1, count, element,
GetIComparer
())); //"ArgumentException should be thrown on index greater than length of array."
Collections\List\SegmentedList.Generic.Tests.Sort.cs (8)
68
IComparer<T> comparer =
GetIComparer
();
82
IComparer<T> comparer =
GetIComparer
();
99
IComparer<T> iComparer =
GetIComparer
();
114
IComparer<T> iComparer =
GetIComparer
();
132
IComparer<T> comparer =
GetIComparer
();
148
IComparer<T> comparer =
GetIComparer
();
182
Assert.Throws<ArgumentOutOfRangeException>(() => list.Sort(invalidSet.Item1, invalidSet.Item2,
GetIComparer
()));
200
Assert.Throws<ArgumentException>(null, () => list.Sort(invalidSet.Item1, invalidSet.Item2,
GetIComparer
()));
Collections\List\TestBase.Generic.cs (1)
276
SortedSet<T> set = new SortedSet<T>(
GetIComparer
());