Skip to content

Commit e293876

Browse files
authored
Merge pull request #85597 from glessard/substring-test-tweaks
2 parents 10e1be4 + 79a040a commit e293876

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/stdlib/subString.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ SubstringTests.test("Mutate Substring through utf16 view") {
207207
expectEqual(s.startIndex, ss.startIndex)
208208
expectEqual(s.count, ss.count)
209209
let first = ss.utf16.removeFirst()
210+
expectEqual(first, UInt16(97))
210211
expectEqual(s.index(after: s.startIndex), ss.startIndex)
211212
expectEqual(s.count - 1, ss.count)
212213
}
@@ -232,7 +233,6 @@ SubstringTests.test("UTF8View") {
232233
]
233234

234235
for s in strs {
235-
let count = s.count
236236
let t = s.utf8.dropFirst(2)
237237
let u = t.dropFirst(2)
238238

@@ -254,8 +254,8 @@ SubstringTests.test("UTF8View") {
254254
checkHasContiguousStorageSubstring(u)
255255
checkMatchContiguousStorage(Array(s.utf8), s.utf8)
256256

257-
// The specialization for Substring.withContiguousStorageIfAvailable was
258-
// added in https://github.com/apple/swift/pull/29146.
257+
// The specialization for Substring.UTF8View.withContiguousStorageIfAvailable
258+
// was added in https://github.com/apple/swift/pull/29146.
259259
guard #available(SwiftStdlib 5.3, *) else {
260260
return
261261
}

0 commit comments

Comments
 (0)