[stdlib] Use Swift-native Character iteration for hasPrefix/Suffix (#14390)

* Use Swift-native Character iteration for hasPrefix/Suffix

* Remove old tests for removed C shims
This commit is contained in:
Ben Cohen
2018-03-12 17:41:55 -07:00
committed by GitHub
parent a5db08643f
commit f9b3e14137
7 changed files with 76 additions and 210 deletions

View File

@@ -272,22 +272,11 @@ StringTests.test("LosslessStringConvertible") {
let substringTests = tests.map {
(test: ComparisonTest) -> ComparisonTest in
switch (test.expectedUnicodeCollation, test.lhs, test.rhs) {
case (.eq, "\u{0}", "\u{0}"):
return test.replacingPredicate(.objCRuntime(
"https://bugs.swift.org/browse/SR-332"))
case (.gt, "\r\n", "\n"):
return test.replacingPredicate(.objCRuntime(
"blocked on rdar://problem/19036555"))
case (.eq, "\u{0301}", "\u{0341}"):
return test.replacingPredicate(.objCRuntime(
"https://bugs.swift.org/browse/SR-243"))
case (.lt, "\u{1F1E7}", "\u{1F1E7}\u{1F1E7}"):
return test.replacingPredicate(.objCRuntime(
"https://bugs.swift.org/browse/SR-367"))
default:
return test
}