Merge set-api branch into swift-3-indexing-model

This commit is contained in:
Dave Abrahams
2016-04-26 15:56:42 -07:00
parent 53297497a6
commit debde16e2c
16 changed files with 1845 additions and 2013 deletions

View File

@@ -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)
}