1
Vote

Deque<T>.Resize() works wrong on shrinking existing deques

description

check the following test
[Test]
    public void ResizeWithShrinking()
    {
        ICollection expected = new[] { 3, 3, 3, 3, 3, 3, 3 };
        Deque<int> deque = new Deque<int>(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
 
        deque.Resize(7, 42);
        Assert.That(deque, Is.EqualTo(expected));
    }

comments