Skip to content

Commit

Permalink
Merge pull request #39 from apple/master
Browse files Browse the repository at this point in the history
[pull] swiftwasm from apple:master
  • Loading branch information
pull[bot] authored Jan 27, 2020
2 parents 30be570 + 37e267f commit b74d61c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ public func checkOneLevelOfRandomAccessCollection<
//===------------------------------------------------------------------===//

let succ = { collection.index(after: $0) }
let pred = { collection.index(before: $0) }
// Advances up to 1 positions without passing endIndex. Don't use
// advanced(by: n) to do this because it's under test here.
let next = { $0 == collection.endIndex ? $0 : succ($0) }
Expand All @@ -924,7 +923,6 @@ public func checkOneLevelOfRandomAccessCollection<
let count: Distance = collection.count
let offset0 = min(5, count)
let offset1 = min(10, count)
let offset2 = min(15, count)

let distanceCandidates: [Distance] = [
-11, -7, -5, -3, -2, -1, 0, 1, 2, 3, 5, 7, 11]
Expand Down Expand Up @@ -1676,7 +1674,6 @@ public func checkOneLevelOfRandomAccessCollection<
//===------------------------------------------------------------------===//

let succ = { collection.index(after: $0) }
let pred = { collection.index(before: $0) }
// Advances up to 1 positions without passing endIndex. Don't use
// advanced(by: n) to do this because it's under test here.
let next = { $0 == collection.endIndex ? $0 : succ($0) }
Expand All @@ -1694,7 +1691,6 @@ public func checkOneLevelOfRandomAccessCollection<
let count: Distance = collection.count
let offset0 = min(5, count)
let offset1 = min(10, count)
let offset2 = min(15, count)

let distanceCandidates: [Distance] = [
-11, -7, -5, -3, -2, -1, 0, 1, 2, 3, 5, 7, 11]
Expand Down Expand Up @@ -1871,7 +1867,7 @@ public func checkRangeReplaceable<C, N>(
let source = Array<A.Element>(makeCollection())

for (ix, i) in source.indices.enumerated() {
for (jx_, j) in (i..<source.endIndex).enumerated() {
for (jx_, _) in (i..<source.endIndex).enumerated() {
let jx = jx_ + ix

let oldCount = jx - ix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ self.test("\(testNamePrefix).subscript(_: Range)/Set/semantics") {

do {
// Call setter implicitly through an inout mutation.
var c = makeWrappedCollection(test.collection)
let c = makeWrappedCollection(test.collection)

var s = c[test.bounds(in: c)]
_mapInPlace(&s) {
Expand Down Expand Up @@ -520,7 +520,7 @@ self.test("\(testNamePrefix).sorted/DispatchesThrough_withUnsafeMutableBufferPoi
}
let c = makeWrappedCollectionWithComparableElement(elements)

var lc = LoggingMutableCollection(wrapping: c)
let lc = LoggingMutableCollection(wrapping: c)

let result = lc.sorted()
let extractedResult = result.map(extractValueFromComparable)
Expand Down Expand Up @@ -639,7 +639,7 @@ self.test("\(testNamePrefix).sorted/DispatchesThrough_withUnsafeMutableBufferPoi
}
let c = makeWrappedCollection(elements)

var lc = LoggingMutableCollection(wrapping: c)
let lc = LoggingMutableCollection(wrapping: c)

let result = lc.sorted { extractValue($0).value < extractValue($1).value }
let extractedResult = result.map(extractValue)
Expand Down

0 comments on commit b74d61c

Please sign in to comment.