[stdlib] String.Index: conform to CustomDebugStringConvertible instead

Apply the LSG’s modifications as detailed in their review notes.
This commit is contained in:
Karoy Lorentey
2024-10-07 16:07:50 -07:00
parent 28ed16b469
commit 29cf262ef7
2 changed files with 22 additions and 32 deletions

View File

@@ -1240,11 +1240,11 @@ if #available(SwiftStdlib 6.1, *) {
}
}
suite.test("String index description backdeployment") {
suite.test("String index debugDescription backdeployment") {
// Note: no availability check
let str = "i\u{308}"
expectEqual(str.startIndex.description, "0[any]")
expectEqual(str.endIndex.description, "3[utf8]")
expectEqual(str.startIndex.debugDescription, "0[any]")
expectEqual(str.endIndex.debugDescription, "3[utf8]")
}