@@ -84,16 +84,12 @@ var testCharacters = [
84
84
" \u{0061} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 9 bytes
85
85
]
86
86
87
- // Only run it on ObjC platforms. Supported Linux versions do not have a
88
- // recent enough ICU
89
- #if _runtime(_ObjC)
90
87
testCharacters += [
91
88
" \u{0061} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 11 bytes
92
89
" \u{0061} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 13 bytes
93
90
" \u{0061} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 15 bytes
94
91
" \u{0061} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 17 bytes
95
92
]
96
- #endif
97
93
98
94
testCharacters += [
99
95
// U+00A9 COPYRIGHT SIGN
@@ -105,8 +101,6 @@ testCharacters += [
105
101
" \u{00a9} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 10 bytes
106
102
]
107
103
108
- // Only run it on recent enough versions of ICU
109
- #if _runtime(_ObjC)
110
104
if #available( iOS 11 . 0 , macOS 10 . 13 , tvOS 11 . 0 , watchOS 4 . 0 , * ) {
111
105
testCharacters += [
112
106
" \u{00a9} \u{0300} \u{0300} \u{0300} \u{0300} \u{0300} " , // UTF-8: 12 bytes
@@ -117,7 +111,6 @@ if #available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *) {
117
111
" 👩👩👦👦 " , // UTF-8: 25 bytes
118
112
]
119
113
}
120
- #endif
121
114
122
115
func randomGraphemeCluster( _ minSize: Int , _ maxSize: Int ) -> String {
123
116
let n = Int . random ( in: ( minSize + 1 ) ..< maxSize)
@@ -224,9 +217,6 @@ CharacterTests.test("CR-LF") {
224
217
}
225
218
226
219
CharacterTests . test ( " Unicode 9 grapheme breaking " ) {
227
- // Only run it on ObjC platforms. Supported Linux versions do not have a
228
- // recent enough ICU for Unicode 9 support.
229
- #if _runtime(_ObjC)
230
220
// Check for Unicode 9 or later
231
221
guard #available( iOS 10 . 0 , macOS 10 . 12 , * ) else { return }
232
222
@@ -241,7 +231,6 @@ CharacterTests.test("Unicode 9 grapheme breaking") {
241
231
let skinTone = " 👋👋🏻👋🏼👋🏽👋🏾👋🏿 "
242
232
expectEqual ( 6 , skinTone. count)
243
233
expectEqual ( skinTone. reversed ( ) . count, skinTone. count)
244
- #endif
245
234
}
246
235
247
236
/// Test that a given `String` can be transformed into a `Character` and back
0 commit comments