Skip to content

Commit b0e20e1

Browse files
committed
[stdlib] Add string view index comparability test
1 parent e5ab750 commit b0e20e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

validation-test/stdlib/StringViews.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,14 @@ tests.test("UTF8 indexes") {
687687
}
688688
}
689689

690+
tests.test("index/Comparable")
691+
.forEach(in: [summer, winter]) { str in
692+
checkComparable(str.characters.indices, oracle: <=>)
693+
checkComparable(str.unicodeScalars.indices, oracle: <=>)
694+
checkComparable(str.utf16.indices, oracle: <=>)
695+
checkComparable(str.utf8.indices, oracle: <=>)
696+
}
697+
690698
tests.test("UTF16->String") {
691699
let s = summer + winter + winter + summer
692700
let v = s.utf16

0 commit comments

Comments
 (0)