public void TestOrderPushBackPopBack() { var d = new Deq <int>(); d.PushBack(1); d.PushBack(2); d.PushBack(3); d.PushBack(4); Assert.AreEqual(4, d.PopBack()); Assert.AreEqual(3, d.PopBack()); Assert.AreEqual(2, d.PopBack()); Assert.AreEqual(1, d.PopBack()); }
public void TestPushFrontPopBackOne() { const int val = 100502; var d = new Deq <int>(); d.PushFront(val); Assert.AreEqual(val, d.PopBack()); Assert.IsTrue(d.Empty); Assert.AreEqual(0, d.Count); }
public void TestOneItem() { const int val = 100500; var d = new Deq<int>(); d.PushBack(val); Sorter.Sort2(d); Assert.IsFalse(d.Empty); Assert.AreEqual(1, d.Count); Assert.AreEqual(val, d.PopBack()); }
public void TestOneItem() { const int val = 100500; var d = new Deq <int>(); d.PushBack(val); Sorter.Sort2(d); Assert.IsFalse(d.Empty); Assert.AreEqual(1, d.Count); Assert.AreEqual(val, d.PopBack()); }
public void TestEmptyPopBack() { var d = new Deq <int>(); d.PopBack(); }
public void TestEmptyPopBack() { var d = new Deq<int>(); d.PopBack(); }
public void TestPushFrontPopBackOne() { const int val = 100502; var d = new Deq<int>(); d.PushFront(val); Assert.AreEqual(val, d.PopBack()); Assert.IsTrue(d.Empty); Assert.AreEqual(0, d.Count); }
public void TestOrderPushFrontPopBack() { var d = new Deq<int>(); d.PushFront(1); d.PushFront(2); d.PushFront(3); d.PushFront(4); Assert.AreEqual(1, d.PopBack()); Assert.AreEqual(2, d.PopBack()); Assert.AreEqual(3, d.PopBack()); Assert.AreEqual(4, d.PopBack()); }