protected override List <T> SortTestHelper <T>(ImmutableTrieList <T> list, int index, int count, IComparer <T> comparer) { var builder = list.ToBuilder(); builder.Sort(index, count, comparer); return(builder.ToImmutable().ToList()); }
protected override List <T> SortTestHelper <T>(ImmutableTrieList <T> list, Comparison <T> comparison) { var builder = list.ToBuilder(); builder.Sort(comparison); return(builder.ToImmutable().ToList()); }
protected override void ReverseTestHelper <T>(ImmutableTrieList <T> list, int index, int count) { var expected = list.ToList(); expected.Reverse(index, count); var builder = list.ToBuilder(); builder.Reverse(index, count); Assert.Equal <T>(expected, builder.ToList()); }
protected override void RemoveAllTestHelper <T>(ImmutableTrieList <T> list, Predicate <T> test) { var builder = list.ToBuilder(); var bcl = list.ToList(); int expected = bcl.RemoveAll(test); var actual = builder.RemoveAll(test); Assert.Equal(expected, actual); Assert.Equal <T>(bcl, builder.ToList()); }
internal override ImmutableTrieListBase <T> GetListQuery <T>(ImmutableTrieList <T> list) { return(list.ToBuilder()); }