@@ -248,66 +248,6 @@ suite.test("symmetricDifference.${inputKind}.${argumentKind}") {
248248% end
249249% end
250250
251- % for inputKind, inputGenerator in inputKinds.items():
252- % for argumentKind, argumentGenerator in argumentKinds.items():
253- % needsCocoa = inputKind == "cocoa" or argumentKind == "cocoa"
254- % if needsCocoa:
255- #if _runtime(_ObjC)
256- % end
257- suite.test("formIntersection.${inputKind}.${argumentKind}") {
258- var a = ${inputGenerator}(0 ..< 10, identity: 1)
259- let b = ${argumentGenerator}(5 ..< 15, identity: 2)
260- a.formSymmetricDifference(b)
261- expectTrue(isNativeSet(a))
262- expectEqual(a.count, 10)
263- // Check the resulting items and that they come from the correct input set.
264- for v in 5 ..< 10 {
265- expectFalse(a.contains(Value(v)), "Found \(v) in result")
266- }
267- for v in Array(0 ..< 5) + Array(10 ..< 15) {
268- guard let i = a.firstIndex(of: Value(v)) else {
269- expectTrue(false, "Could not find \(v) in result")
270- continue
271- }
272- expectEqual(a[i].identity, v < 5 ? 1 : 2)
273- }
274- }
275- % if needsCocoa:
276- #endif
277- % end
278- % end
279- % end
280-
281- % for inputKind, inputGenerator in inputKinds.items():
282- % for argumentKind, argumentGenerator in argumentKinds.items():
283- % needsCocoa = inputKind == "cocoa" or argumentKind == "cocoa"
284- % if needsCocoa:
285- #if _runtime(_ObjC)
286- % end
287- suite.test("symmetricDifference.${inputKind}.${argumentKind}") {
288- let a = ${inputGenerator}(0 ..< 10, identity: 1)
289- let b = ${argumentGenerator}(5 ..< 15, identity: 2)
290- let c = a.symmetricDifference(b)
291- expectTrue(isNativeSet(c))
292- expectEqual(c.count, 10)
293- // Check the resulting items and that they come from the correct input set.
294- for v in 5 ..< 10 {
295- expectFalse(c.contains(Value(v)), "Found \(v) in result")
296- }
297- for v in Array(0 ..< 5) + Array(10 ..< 15) {
298- guard let i = c.firstIndex(of: Value(v)) else {
299- expectTrue(false, "Could not find \(v) in result")
300- continue
301- }
302- expectEqual(c[i].identity, v < 5 ? 1 : 2)
303- }
304- }
305- % if needsCocoa:
306- #endif
307- % end
308- % end
309- % end
310-
311251% for inputKind, inputGenerator in inputKinds.items():
312252% for argumentKind, argumentGenerator in argumentKinds.items():
313253% needsCocoa = inputKind == "cocoa" or argumentKind == "cocoa"
0 commit comments