Skip to content

Commit f213272

Browse files
authored
Merge pull request #40125 from apple/Set-test-cleanup
[test] Remove duplicate symmetricDifference tests
2 parents 41c4528 + 16d7525 commit f213272

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

validation-test/stdlib/SetOperations.swift.gyb

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)