예제 #1
0
        public void TestSort()
        {
            var size        = (1 << 14) + 1234;
            var list        = new LargeList <Int32>();
            var helperArray = new Int32[size];
            var random      = new Random();

            for (int i = 0; i < size; i++)
            {
                var n = random.Next();
                helperArray[i] = n;
                list.Add(n);
            }

            Array.Sort(helperArray);
            list.Sort();

            for (int i = 0; i < size; i++)
            {
                Assert.AreEqual(helperArray[i], list[i]);
            }
        }