Skip to content

Commit 0aa5bee

Browse files
authored
Merge pull request #84539 from milseman/better_test
Adjust test to be more resilient w.r.t. inlining.
2 parents 54627fb + 2815cf9 commit 0aa5bee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/stdlib/StringIndex.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,11 @@ if #available(SwiftStdlib 6.1, *) {
12431243
suite.test("String index debugDescription backdeployment") {
12441244
// Note: no availability check
12451245
let str = "i\u{308}"
1246-
expectEqual(str.startIndex.debugDescription, "0[any]")
1246+
// Result can be `any` or `unknown` depending on inlining behavior
1247+
expectTrue(
1248+
str.startIndex.debugDescription == "0[any]" ||
1249+
str.startIndex.debugDescription == "0[unknown]"
1250+
)
12471251
expectEqual(str.endIndex.debugDescription, "3[utf8]")
12481252
}
12491253

0 commit comments

Comments
 (0)