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