isOrderedBefore: => by areInIncreasingOrder:

This commit is contained in:
Dave Abrahams
2016-06-07 15:07:23 -07:00
parent 4b072f630c
commit 014b6972cf
16 changed files with 114 additions and 112 deletions

View File

@@ -144,12 +144,12 @@ func randomArray() -> A<Int> {
Algorithm.test("invalidOrderings") {
withInvalidOrderings {
var a = randomArray()
_blackHole(a.sorted(isOrderedBefore: $0))
_blackHole(a.sorted(by: $0))
}
withInvalidOrderings {
var a: A<Int>
a = randomArray()
_ = a.partition(isOrderedBefore: $0)
_ = a.partition(by: $0)
}
/*
// FIXME: Disabled due to <rdar://problem/17734737> Unimplemented:
@@ -188,7 +188,7 @@ func makeQSortKiller(_ len: Int) -> [Int] {
var ary = [Int](repeating: 0, count: len)
var ret = [Int](repeating: 0, count: len)
for i in 0..<len { ary[i] = i }
ary = ary.sorted(isOrderedBefore: Compare)
ary = ary.sorted(by: Compare)
for i in 0..<len {
ret[ary[i]] = i
}