 mirrors.test("ForwardStructure") {
   struct DoubleYou : CustomReflectable {
     func reflect() -> Mirror {
-      return Mirror(Set(letters), schema: .Set)
+      return Mirror(Set(letters), schema: .MembershipContainer)
     }
   }
 
   let w = DoubleYou().reflect()
-  expectEqual(.Set, w.schema)
+  expectEqual(.MembershipContainer, w.schema)
   expectEqual(count(letters), numericCast(count(w.structure)))
   
   // Because we don't control the order of a Set, we need to do a

mirrors.test("BidirectionalStructure") {
  struct Why : CustomReflectable {
    func reflect() -> Mirror {
      return Mirror(letters, schema: .Array)
    }
  }

  // Test that the basics seem to work
  let y = Why().reflect()
  expectEqual(.Array, y.schema)

  let description = y.description
  expectEqual(

  struct Zee2 : CustomReflectable {
    func reflect() -> Mirror {
      return Mirror(
        LabeledStructure(["bark": 1, "bite": 0]), schema: .KeyContainer)
    }
  }
  let z2 = Zee2().reflect()
  expectEqual(.KeyContainer, z2.schema)
  expectEqual("[bark: 1, bite: 0]", z2.description)
}

mirrors.test("Legacy") {
  let m = reflect([1, 2, 3])
  let x0: [Mirror.Child] = [
    (label: "[0]", value: 1),
    (label: "[1]", value: 2),
    (label: "[2]", value: 3)
  ]
  expectFalse(
    contains(zip(x0, m.structure)) {
      $0.0.label != $0.1.label || $0.0.value as! Int != $0.1.value as! Int
    })
}

mirrors.test("Addressing") {
  let m0 = reflect([1, 2, 3])
  expectEqual(1, m0.address(0) as? Int)
  expectEqual(1, m0.address("[0]") as? Int)
  expectEqual(2, m0.address(1) as? Int)
  expectEqual(2, m0.address("[1]") as? Int)
  expectEqual(3, m0.address(2) as? Int)
  expectEqual(3, m0.address("[2]") as? Int)
  
  let m1 = reflect((a: ["one", "two", "three"], b: 4))
  let ott0 = m1.address(0) as? [String]
  expectNotEmpty(ott0)
  let ott1 = m1.address(".0") as? [String]
  expectNotEmpty(ott1)
  if ott0 != nil && ott1 != nil {
    expectEqualSequence(ott0!, ott1!)
  }
  expectEqual(4, m1.address(1) as? Int)
  expectEqual(4, m1.address(".1") as? Int)
  expectEqual("one", m1.address(0, 0) as? String)
  expectEqual("two", m1.address(0, 1) as? String)
  expectEqual("three", m1.address(0, 2) as? String)
  expectEqual("one", m1.address(".0", 0) as? String)
  expectEqual("two", m1.address(0, "[1]") as? String)
  expectEqual("three", m1.address(".0", "[2]") as? String)
  
  let x = [
    (a: ["one", "two", "three"], b: 4),
    (a: ["five"], b: 6),
    (a: [], b: 7)]

  let m = reflect(x)
  let two = m.address(0, ".0", 1)
  expectEqual("two", two as? String)
}
runAllTests()
