Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/stdlib/subString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ SubstringTests.test("Mutate Substring through utf16 view") {
expectEqual(s.startIndex, ss.startIndex)
expectEqual(s.count, ss.count)
let first = ss.utf16.removeFirst()
expectEqual(first, UInt16(97))
expectEqual(s.index(after: s.startIndex), ss.startIndex)
expectEqual(s.count - 1, ss.count)
}
Expand All @@ -232,7 +233,6 @@ SubstringTests.test("UTF8View") {
]

for s in strs {
let count = s.count
let t = s.utf8.dropFirst(2)
let u = t.dropFirst(2)

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

// The specialization for Substring.withContiguousStorageIfAvailable was
// added in https://github.com/apple/swift/pull/29146.
// The specialization for Substring.UTF8View.withContiguousStorageIfAvailable
// was added in https://github.com/apple/swift/pull/29146.
guard #available(SwiftStdlib 5.3, *) else {
return
}
Expand Down