def test_ArrayQueue_front(self): queue = ArrayQueue() for i in range(100): queue.enqueue(i + 1) for i in range(100): assert_equal(i + 1, queue.front()) queue.dequeue()
def test_ArrayQueue_multipleoperations(self): queue = ArrayQueue() for i in range(100): queue.enqueue(i + 100) for i in range(50): queue.dequeue() for i in range(100): queue.enqueue(i + 200) assert_equal(150, queue.front())
def test_ArrayQueue_enqueue(self): queue = ArrayQueue() for i in range(100): queue.enqueue(i + 1) assert_equal(1, queue.front()) assert_equal(100, len(queue))
def test_emptyArrayQueue_front(self): queue = ArrayQueue() val = queue.front()