Пример #1
0
        public int PartitionedListAddOnly()
        {
            var l = new PartitionedList <int>(N, 18000);

            for (int i = 0; i < N; ++i)
            {
                l.Append(i);
            }

            return(l.Count());
        }
Пример #2
0
        public void CountTestWithExactInitialCapacity()
        {
            Prop.ForAll <int[]>(xs =>
            {
                var pList = new PartitionedList <int>(xs.Length, 1000);
                foreach (var x in xs)
                {
                    pList.Append(x);
                }

                return(xs.Length == pList.Count());
            }).QuickCheckThrowOnFailure();
        }