Exemplo n.º 1
0
        public void TestTrim()
        {
            FasterList <int> list = new FasterList <int>();

            for (int i = 0; i < 10; i++)
            {
                list.Add(i);
            }

            list.UnorderedRemoveAt(3);
            list.UnorderedRemoveAt(0);
            list.UnorderedRemoveAt(7);

            list.Trim();

            Assert.That(list.capacity, Is.EqualTo(7));
            Assert.That(list.count, Is.EqualTo(7));
        }