       return extractValueFromEquatable(candidate).value == test.element.value
     }
     let zeroBasedIndex = result.map {
-      numericCast(c.startIndex.distance(to: $0)) as Int
+      numericCast(c.distance(from: c.startIndex, to: $0)) as Int
     }
     expectEqual(
       test.expected,

    let survivingIndices =
      Array(
        slice.startIndex ..<
        slice.endIndex.advanced(by: numericCast(-test.numberToRemove))
      )
    let removedElement = slice.removeLast()
    expectEqual(


//===----------------------------------------------------------------------===//

  } // addCollectionTests

  public func addBidirectionalCollectionTests<
    C : BidirectionalCollection,
    CollectionWithEquatableElement : BidirectionalCollection
    where
    C.Index : Comparable,
    C.SubSequence : BidirectionalCollection,
    C.SubSequence.Iterator.Element == C.Iterator.Element,
    C.SubSequence.Index : Comparable,
    C.SubSequence.SubSequence == C.SubSequence,
    CollectionWithEquatableElement.Index : Comparable,
    CollectionWithEquatableElement.Iterator.Element : Equatable
  >(
    testNamePrefix: String = "",
