Removed some warnings (#12753)

This commit is contained in:
Ben Cohen
2017-11-30 15:12:56 -08:00
committed by GitHub
parent 5ace363dbc
commit dcab9493ae
20 changed files with 571 additions and 553 deletions

View File

@@ -228,7 +228,7 @@ func checkCharacterComparison(
}
for test in comparisonTests {
if test.lhs.characters.count == 1 && test.rhs.characters.count == 1 {
if test.lhs.count == 1 && test.rhs.count == 1 {
StringTests.test("Character.{Equatable,Hashable,Comparable}: line \(test.loc.line)")
.xfail(test.xfail)
.code {
@@ -262,11 +262,11 @@ func checkHasPrefixHasSuffix(
// To determine the expected results, compare grapheme clusters,
// scalar-to-scalar, of the NFD form of the strings.
let lhsNFDGraphemeClusters =
lhs.decomposedStringWithCanonicalMapping.characters.map {
lhs.decomposedStringWithCanonicalMapping.map {
Array(String($0).unicodeScalars)
}
let rhsNFDGraphemeClusters =
rhs.decomposedStringWithCanonicalMapping.characters.map {
rhs.decomposedStringWithCanonicalMapping.map {
Array(String($0).unicodeScalars)
}
let expectHasPrefix = lhsNFDGraphemeClusters.starts(