   // Can't upgrade a non-random-access collection to random access
   let s0 = "Hello, Woyld".characters
   let bc1 = AnyBidirectionalCollection(s0)
-  let fc3 = AnyForwardCollection(bc1)
+  let fc3 = AnyCollection(bc1)
   expectTrue(fc3 === bc1)
   expectEmpty(AnyRandomAccessCollection(bc1))
   expectEmpty(AnyRandomAccessCollection(fc3))

let initialCallCounts = [
  "successor": 0, "predecessor": 0,
  "_successorInPlace": 0, "_predecessorInPlace": 0,
  "advanced(by:)": 0, "distance(to:)": 0
]

var callCounts = initialCallCounts
  
struct InstrumentedIndex<I : RandomAccessIndex> : RandomAccessIndex {
  typealias Distance = I.Distance

  var base: I
  
  init(_ base: I) {
    self.base = base
  }
  
  static func resetCounts() {
    callCounts = initialCallCounts
  }
  
  func successor() -> InstrumentedIndex {
    callCounts["successor"]! += 1
    return InstrumentedIndex(base.successor())
  }
  
  mutating func _successorInPlace() {
    callCounts["_successorInPlace"]! += 1
    base._successorInPlace()
  }
  
  func predecessor() -> InstrumentedIndex {
    callCounts["predecessor"]! += 1
    return InstrumentedIndex(base.predecessor())
  }
  
  mutating func _predecessorInPlace() {
    callCounts["_predecessorInPlace"]! += 1
    base._predecessorInPlace()
  }
  
  func advanced(by distance: Distance) -> InstrumentedIndex {
    callCounts["advanced(by:)"]! += 1
    return InstrumentedIndex(base.advanced(by: distance))
  }
  
  func distance(to other: InstrumentedIndex) -> Distance {
    callCounts["distance(to:)"]! += 1
    return base.distance(to: other.base)
  }
}

tests.test("AnySequence.init(Sequence)") {

  }
}

tests.test("AnyCollection successor/predecessor") {
  let c = AnyCollection(InstrumentedCollection(0..<10))
  var i = c.startIndex

  i = c.next(i)
  expectEqual(1, callCounts["successor"])
  expectEqual(0, callCounts["_successorInPlace"])

  c._nextInPlace(&i)
  expectEqual(1, callCounts["successor"])
  expectEqual(1, callCounts["_successorInPlace"])

  var x = i
  i = c.next(i)
  expectEqual(2, callCounts["successor"])
  expectEqual(1, callCounts["_successorInPlace"])
  _blackHole(x)
}

tests.test("AnyBidirectionalCollection successor/predecessor") {
  let c = AnyBidirectionalCollection(InstrumentedCollection(0..<10))
  var i = c.startIndex

  expectEqual(0, callCounts["predecessor"])
  expectEqual(0, callCounts["_predecessorInPlace"])

  i = c.previous(i)
  expectEqual(1, callCounts["predecessor"])
  expectEqual(0, callCounts["_predecessorInPlace"])

  c._previousInPlace(&i)
  expectEqual(1, callCounts["predecessor"])
  expectEqual(1, callCounts["_predecessorInPlace"])

  var x = i
  i = c.previous(i)
  expectEqual(2, callCounts["predecessor"])
  expectEqual(1, callCounts["_predecessorInPlace"])
  _blackHole(x)
