Beispiel #1
0
        public static void RemoveLast()
        {
            var distributedArray = new BigArray <int>();
            int size             = 4 * MaxBlockSize;

            var checkList = new List <int>(size);

            //Add
            for (int i = 0; i < size; i++)
            {
                distributedArray.Add(i);
                checkList.Add(i);
            }

            //Remove
            for (int i = 0; i < size; i++)
            {
                distributedArray.RemoveLast();
                checkList.RemoveAt(checkList.Count - 1);

                Assert.AreEqual(distributedArray.Count, checkList.Count);
            }

            CheckEqual(distributedArray, checkList);
        }