From 79a040a732d223d47fd457ace4f6c1347a5d15f7 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Wed, 19 Nov 2025 11:51:07 -0800 Subject: [PATCH] [test] minor test tweaks Clarify a comment, and eliminate unused variable warnings. --- test/stdlib/subString.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/stdlib/subString.swift b/test/stdlib/subString.swift index 2a7b9e58db2d8..3d910d18dab0a 100644 --- a/test/stdlib/subString.swift +++ b/test/stdlib/subString.swift @@ -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) } @@ -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) @@ -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 }