Skip to content

Commit 578ea31

Browse files
authored
Merge pull request #474 from lorentey/avoid-index-description
[Rope] Resolve deprecation warnings on `String.Index._description`
2 parents 98697da + c25a388 commit 578ea31

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Tests/RopeModuleTests/TestBigString.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ class TestBigString: CollectionTestCase {
171171
guard i1 < flat.endIndex, i2 < big.endIndex else { continue }
172172
let c1 = flat[i1]
173173
let c2 = big[i2]
174-
expectEqual(c1, c2, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
174+
expectEqual(c1, c2, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
175175
}
176176

177177
for i in 0 ..< c {
178178
let i1 = indices1[i]
179179
let i2 = indices2[i]
180180
let d1 = flat.utf8.distance(from: flat.startIndex, to: i1)
181181
let d2 = big.utf8.distance(from: big.startIndex, to: i2)
182-
expectEqual(d2, d1, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
182+
expectEqual(d2, d1, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
183183
}
184184
return (indices1, indices2)
185185
}
@@ -221,15 +221,15 @@ class TestBigString: CollectionTestCase {
221221
guard i1 < flat.endIndex, i2 < big.endIndex else { continue }
222222
let c1 = flat.unicodeScalars[i1]
223223
let c2 = big.unicodeScalars[i2]
224-
expectEqual(c1, c2, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
224+
expectEqual(c1, c2, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
225225
}
226226

227227
for i in 0 ..< c {
228228
let i1 = indices1[i]
229229
let i2 = indices2[i]
230230
let d1 = flat.utf8.distance(from: flat.startIndex, to: i1)
231231
let d2 = big.utf8.distance(from: big.startIndex, to: i2)
232-
expectEqual(d2, d1, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
232+
expectEqual(d2, d1, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
233233
}
234234
return (indices1, indices2)
235235
}
@@ -271,15 +271,15 @@ class TestBigString: CollectionTestCase {
271271
guard i1 < flat.endIndex, i2 < big.endIndex else { continue }
272272
let c1 = flat.utf8[i1]
273273
let c2 = big.utf8[i2]
274-
expectEqual(c1, c2, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
274+
expectEqual(c1, c2, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
275275
}
276276

277277
for i in 0 ..< c {
278278
let i1 = indices1[i]
279279
let i2 = indices2[i]
280280
let d1 = flat.utf8.distance(from: flat.startIndex, to: i1)
281281
let d2 = big.utf8.distance(from: big.startIndex, to: i2)
282-
expectEqual(d2, d1, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
282+
expectEqual(d2, d1, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
283283
}
284284
return (indices1, indices2)
285285
}
@@ -321,15 +321,15 @@ class TestBigString: CollectionTestCase {
321321
guard i1 < flat.endIndex, i2 < big.endIndex else { continue }
322322
let c1 = flat.utf16[i1]
323323
let c2 = big.utf16[i2]
324-
expectEqual(c1, c2, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
324+
expectEqual(c1, c2, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
325325
}
326326

327327
for i in 0 ..< c {
328328
let i1 = indices1[i]
329329
let i2 = indices2[i]
330330
let d1 = flat.utf16.distance(from: flat.startIndex, to: i1)
331331
let d2 = big.utf16.distance(from: big.startIndex, to: i2)
332-
expectEqual(d2, d1, "i: \(i), i1: \(i1._description), i2: \(i2)", file: file, line: line)
332+
expectEqual(d2, d1, "i: \(i), i1: \(i1), i2: \(i2)", file: file, line: line)
333333
}
334334
return (indices1, indices2)
335335
}

0 commit comments

Comments
 (0)