Skip to content

Commit a0c7d11

Browse files
author
Lance Parker
committed
fix linux tests
1 parent 4455226 commit a0c7d11

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

validation-test/stdlib/String.swift

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,8 +2199,8 @@ for test in comparisonTestCases {
21992199
}
22002200

22012201
StringTests.test("Comparison.OpaqueSubstring.\(test.strings)")
2202-
.skip(.linuxAny(reason: "NSSlowString requires ObjC interop"))
2203-
.code {
2202+
.skip(.linuxAny(reason: "NSSlowString requires ObjC interop"))
2203+
.code {
22042204
test.testOpaqueSubstrings()
22052205
}
22062206
}
@@ -2220,24 +2220,17 @@ StringTests.test("NormalizationCheck") {
22202220
expectEqual(expectedCodeUnits, nfcCodeUnits)
22212221
}
22222222

2223-
StringTests.test("NormalizationCheck/Opaque") {
2223+
StringTests.test("NormalizationCheck/Opaque")
2224+
.skip(.linuxAny(reason: "NSSlowString requires ObjC interop"))
2225+
.code {
2226+
#if _runtime(_ObjC)
22242227
let str = "\u{0336}\u{0344}\u{0357}\u{0343}\u{0314}\u{0351}\u{0340}\u{0300}\u{0340}\u{0360}\u{0314}\u{0357}\u{0315}\u{0301}\u{0344}a"
22252228
let opaqueString = NSSlowString(string: str) as String
22262229
let nfcCodeUnits = opaqueString._nfcCodeUnits
22272230
let expectedCodeUnits: [UInt8] = [0xCC, 0xB6, 0xCC, 0x88, 0xCC, 0x81, 0xCD, 0x97, 0xCC, 0x93, 0xCC, 0x94, 0xCD, 0x91, 0xCC, 0x80, 0xCC, 0x80, 0xCC, 0x80, 0xCC, 0x94, 0xCD, 0x97, 0xCC, 0x81, 0xCC, 0x88, 0xCC, 0x81, 0xCC, 0x95, 0xCD, 0xA0, 0x61]
22282231

22292232
expectEqual(expectedCodeUnits, nfcCodeUnits)
2230-
}
2231-
2232-
StringTests.test("ABC") {
2233-
let str = "abcdefg"
2234-
let nfcCodeUnits = str._nfcCodeUnits
2235-
let expectedCodeUnits = Array(str.utf8)
2236-
2237-
expectEqual(expectedCodeUnits, nfcCodeUnits)
2238-
2239-
let opaqueString = NSSlowString(string: str) as String
2240-
expectEqual(expectedCodeUnits, opaqueString._nfcCodeUnits)
2233+
#endif
22412234
}
22422235

22432236
runAllTests()

0 commit comments

Comments
 (0)