mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge set-api branch into swift-3-indexing-model
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
import TestsUtils
|
||||
|
||||
@inline(never)
|
||||
public func run_SetIsSubsetOf(_ N: Int) {
|
||||
public func run_SetIsSubset(of N: Int) {
|
||||
let size = 200
|
||||
|
||||
SRand()
|
||||
@@ -28,7 +28,7 @@ public func run_SetIsSubsetOf(_ N: Int) {
|
||||
|
||||
var isSubset = false;
|
||||
for _ in 0 ..< N * 5000 {
|
||||
isSubset = set.isSubsetOf(otherSet)
|
||||
isSubset = set.isSubset(of: otherSet)
|
||||
if isSubset {
|
||||
break
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public func run_SetExclusiveOr(_ N: Int) {
|
||||
|
||||
var xor = Set<Int>()
|
||||
for _ in 0 ..< N * 100 {
|
||||
xor = set.exclusiveOr(otherSet)
|
||||
xor = set.symmetricDifference(otherSet)
|
||||
}
|
||||
sink(&xor)
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public func run_SetIntersect(_ N: Int) {
|
||||
|
||||
var and = Set<Int>()
|
||||
for _ in 0 ..< N * 100 {
|
||||
and = set.intersect(otherSet)
|
||||
and = set.intersection(otherSet)
|
||||
}
|
||||
sink(&and)
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public func run_SetIsSubsetOf_OfObjects(_ N: Int) {
|
||||
|
||||
var isSubset = false;
|
||||
for _ in 0 ..< N * 5000 {
|
||||
isSubset = set.isSubsetOf(otherSet)
|
||||
isSubset = set.isSubset(of: otherSet)
|
||||
if isSubset {
|
||||
break
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public func run_SetExclusiveOr_OfObjects(_ N: Int) {
|
||||
|
||||
var xor = Set<Box<Int>>()
|
||||
for _ in 0 ..< N * 100 {
|
||||
xor = set.exclusiveOr(otherSet)
|
||||
xor = set.symmetricDifference(otherSet)
|
||||
}
|
||||
sink(&xor)
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public func run_SetIntersect_OfObjects(_ N: Int) {
|
||||
|
||||
var and = Set<Box<Int>>()
|
||||
for _ in 0 ..< N * 100 {
|
||||
and = set.intersect(otherSet)
|
||||
and = set.intersection(otherSet)
|
||||
}
|
||||
sink(&and)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user