@@ -1251,36 +1251,32 @@ do {
1251
1251
% for Traversal in 'Forward', 'Bidirectional':
1252
1252
% TraversalCollection = collectionForTraversal(Traversal)
1253
1253
1254
- // re-enable commented out test case below as well when this is fixed
1255
- // (find FIXME: rdar45956357)
1256
- if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) {
1257
- tests.test("FlattenCollection/${Traversal}/\(data)") {
1258
- let base = Minimal${TraversalCollection}(
1259
- elements: data.map { Minimal${TraversalCollection}(elements: $0) })
1260
-
1261
- let flattened = base.joined()
1262
- check${Traversal}Collection(expected, flattened, resiliencyChecks: .none)
1263
-
1264
- // Checking that flatten doesn't introduce laziness
1265
- var calls = 0
1266
- _ = flattened.map { _ in calls += 1 }
1267
- expectLE(
1268
- expected.count, calls,
1269
- "unexpected laziness in \(type(of: flattened))")
1270
- }
1271
-
1272
- tests.test("FlattenCollection/${Traversal}/Lazy\(data)") {
1273
- // Checking that flatten doesn't remove laziness
1274
- let base = Minimal${TraversalCollection}(
1275
- elements: data.map { Minimal${TraversalCollection}(elements: $0) }
1276
- ).lazy.map { $0 }
1277
-
1278
- let flattened = base.joined()
1279
-
1280
- var calls = 0
1281
- _ = flattened.map { _ in calls += 1 }
1282
- expectEqual(0, calls, "unexpected eagerness in \(type(of: flattened))")
1283
- }
1254
+ tests.test("FlattenCollection/${Traversal}/\(data)") {
1255
+ let base = Minimal${TraversalCollection}(
1256
+ elements: data.map { Minimal${TraversalCollection}(elements: $0) })
1257
+
1258
+ let flattened = base.joined()
1259
+ check${Traversal}Collection(expected, flattened, resiliencyChecks: .none)
1260
+
1261
+ // Checking that flatten doesn't introduce laziness
1262
+ var calls = 0
1263
+ _ = flattened.map { _ in calls += 1 }
1264
+ expectLE(
1265
+ expected.count, calls,
1266
+ "unexpected laziness in \(type(of: flattened))")
1267
+ }
1268
+
1269
+ tests.test("FlattenCollection/${Traversal}/Lazy\(data)") {
1270
+ // Checking that flatten doesn't remove laziness
1271
+ let base = Minimal${TraversalCollection}(
1272
+ elements: data.map { Minimal${TraversalCollection}(elements: $0) }
1273
+ ).lazy.map { $0 }
1274
+
1275
+ let flattened = base.joined()
1276
+
1277
+ var calls = 0
1278
+ _ = flattened.map { _ in calls += 1 }
1279
+ expectEqual(0, calls, "unexpected eagerness in \(type(of: flattened))")
1284
1280
}
1285
1281
% end
1286
1282
}
@@ -1295,38 +1291,20 @@ struct TryFlattenIndex<C: Collection> where C.Element: Collection {
1295
1291
1296
1292
let prefixDropWhileTests: [(data: [Int], value: Int, pivot: Int)]
1297
1293
1298
- // FIXME: rdar45956357
1299
- if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) {
1300
- prefixDropWhileTests = [
1301
- ([], 0, 0),
1302
- ([0], 0, 0),
1303
- ([0], 99, 1),
1304
- ([0, 10], 0, 0),
1305
- ([0, 10], 10, 1),
1306
- ([0, 10], 99, 2),
1307
- ([0, 10, 20, 30, 40], 0, 0),
1308
- ([0, 10, 20, 30, 40], 10, 1),
1309
- ([0, 10, 20, 30, 40], 20, 2),
1310
- ([0, 10, 20, 30, 40], 30, 3),
1311
- ([0, 10, 20, 30, 40], 40, 4),
1312
- ([0, 10, 20, 30, 40], 99, 5)
1313
- ]
1314
- } else {
1315
- prefixDropWhileTests = [
1316
- ([], 0, 0),
1317
- ([0], 0, 0),
1318
- // ([0], 99, 1),
1319
- ([0, 10], 0, 0),
1320
- // ([0, 10], 10, 1),
1321
- // ([0, 10], 99, 2),
1322
- // ([0, 10, 20, 30, 40], 0, 0),
1323
- // ([0, 10, 20, 30, 40], 10, 1),
1324
- // ([0, 10, 20, 30, 40], 20, 2),
1325
- // ([0, 10, 20, 30, 40], 30, 3),
1326
- // ([0, 10, 20, 30, 40], 40, 4),
1327
- // ([0, 10, 20, 30, 40], 99, 5)
1328
- ]
1329
- }
1294
+ prefixDropWhileTests = [
1295
+ ([], 0, 0),
1296
+ ([0], 0, 0),
1297
+ ([0], 99, 1),
1298
+ ([0, 10], 0, 0),
1299
+ ([0, 10], 10, 1),
1300
+ ([0, 10], 99, 2),
1301
+ ([0, 10, 20, 30, 40], 0, 0),
1302
+ ([0, 10, 20, 30, 40], 10, 1),
1303
+ ([0, 10, 20, 30, 40], 20, 2),
1304
+ ([0, 10, 20, 30, 40], 30, 3),
1305
+ ([0, 10, 20, 30, 40], 40, 4),
1306
+ ([0, 10, 20, 30, 40], 99, 5)
1307
+ ]
1330
1308
1331
1309
% for Kind in 'Sequence', 'Forward', 'Bidirectional':
1332
1310
% Self = 'Sequence' if Kind == 'Sequence' else collectionForTraversal(Kind)
0 commit comments