       pushFront in a container to insert the data: (front) 1...testLength (back)
     */
     func doubleEndedContainerPushFrontTest<T: DoubleEndedContainer where T.Generator.Element == Int>(inout container: T) {
-        // Test pushFront()
+        
+        doubleEndedContainerEmptyTest(&container)
+        
         for element in Array((1...testLength).reverse()) {
             container.pushFront(element)
             let count = testLength - element + 1

            assert(container.back == element - 1, "Bad back")
            assert(container.front == 1, "Bad front")
        }
        let popped = container.popBack()
        assert(popped == 1, "Bad popFront() element")
        assert(container.count == 0, "Container should have 0 elements")
        assert(container.isEmpty, "Container should be empty")
        assert(container.front == nil, "Bad front")
        assert(container.back == nil, "Bad back")
        
        let popped2 = container.popBack()
        assert(popped2 == nil, "Bad popFront() element")
    }
    
    /**
        popFront from a container with the data: (front) 1...testLength (back)
     */
    func doubleEndedContainerPopFrontTest<T: DoubleEndedContainer where T.Generator.Element == Int>(inout container: T) {
        // Test popFront()
        for element in 1...(testLength - 1) {
            let popped = container.popFront()
            assert(popped! == element, "Bad popFront() element")

    func testCircularArrayPerformance() {
        self.measureBlock() {
            let length = 1000
            var circarray = CircularArray<Int>(capacity: length)
            for _ in 1...length {
                circarray.pushFront(1)
            }
