Skip to content

Commit df82fb8

Browse files
authored
Merge pull request #254 from CodaFi/ninety-one
Update for Xcode 9.1
2 parents 6044150 + 816076e commit df82fb8

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "trill-lang/FileCheck" "0.0.3"
1+
github "trill-lang/FileCheck" "0.0.4"

Carthage/Checkouts/FileCheck

Sources/SwiftCheck/Arbitrary.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ extension String : Arbitrary {
314314

315315
/// The default shrinking function for `String` values.
316316
public static func shrink(_ s : String) -> [String] {
317-
return [Character].shrink([Character](s.characters)).map { String($0) }
317+
return [Character].shrink(s.map{$0}).map { String($0) }
318318
}
319319
}
320320

Sources/SwiftCheck/CoArbitrary.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ extension String : CoArbitrary {
7171
}
7272
return comp(
7373
Character.coarbitrary(x[x.startIndex]),
74-
String.coarbitrary(String(x[x.characters.index(after: x.startIndex)..<x.endIndex]))
74+
String.coarbitrary(String(x[x.index(after: x.startIndex)..<x.endIndex]))
7575
)
7676
}
7777
}

Sources/SwiftCheck/Property.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ private func printLabels(_ st : TestResult) {
670670
let gAllLabels = st.labels.map({ t in
671671
return t.0 + ", "
672672
}).reduce("", +)
673-
print("(" + gAllLabels[gAllLabels.startIndex..<gAllLabels.characters.index(gAllLabels.endIndex, offsetBy: -2)] + ")")
673+
print("(" + gAllLabels[gAllLabels.startIndex..<gAllLabels.index(gAllLabels.endIndex, offsetBy: -2)] + ")")
674674
}
675675
}
676676

Tests/SwiftCheckTests/ComplexSpec.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ComplexSpec : XCTestCase {
4646
/// CHECKEMAIL: *** Passed 1 test
4747
/// CHECKEMAIL-NEXT: .
4848
property("Generated email addresses contain 1 @", arguments: args) <- forAll(emailGen) { (e : String) in
49-
return e.filter({ $0 == "@" }).characters.count == 1
49+
return (e.filter({ $0 == "@" }) as [Character]).count == 1
5050
}.once
5151
})
5252
}
@@ -70,7 +70,7 @@ class ComplexSpec : XCTestCase {
7070
/// CHECKIPV6: *** Passed 100 tests
7171
/// CHECKIPV6-NEXT: .
7272
property("Generated IPs contain 3 sections") <- forAll(ipGen) { (e : String) in
73-
return e.filter({ $0 == ":" }).characters.count == 3
73+
return (e.filter({ $0 == ":" }) as [Character]).count == 3
7474
}
7575
})
7676
}
@@ -91,6 +91,6 @@ func glue(_ parts : [Gen<String>]) -> Gen<String> {
9191

9292
extension String {
9393
fileprivate var initial : String {
94-
return String(self[self.startIndex..<self.characters.index(before: self.endIndex)])
94+
return String(self[self.startIndex..<self.index(before: self.endIndex)])
9595
}
9696
}

0 commit comments

Comments
 (0)