Example #1
0
        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());
        }
Example #2
0
        protected override List <T> SortTestHelper <T>(ImmutableTrieList <T> list, Comparison <T> comparison)
        {
            var builder = list.ToBuilder();

            builder.Sort(comparison);
            return(builder.ToImmutable().ToList());
        }
Example #3
0
        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());
        }
Example #4
0
        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());
        }
Example #5
0
 internal override ImmutableTrieListBase <T> GetListQuery <T>(ImmutableTrieList <T> list)
 {
     return(list.ToBuilder());
 }