Skip to content

Commit fbc76af

Browse files
committed
[stdlib] Enable validation-test/stdlib/Unicode test on non-Darwin platforms
1 parent a538e4f commit fbc76af

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

validation-test/stdlib/Unicode.swift

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
// RUN: %target-run-simple-swift
1+
// RUN: rm -rf %t
2+
// RUN: mkdir -p %t
3+
// RUN: %target-build-swift %s -o %t/a.out -Xfrontend -disable-objc-attr-requires-foundation-module
4+
// RUN: %target-run %t/a.out
25
// REQUIRES: executable_test
36

4-
// FIXME: rdar://problem/19648117 Needs splitting objc parts out
5-
// XFAIL: linux
6-
77
import SwiftPrivate
88
import StdlibUnittest
99
import StdlibCollectionUnittest
1010

1111

12-
import Foundation
13-
1412
var UTF16APIs = TestSuite("UTF16APIs")
1513

1614
UTF16APIs.test("width") {
@@ -816,7 +814,7 @@ UTF8Decoder.test("Internal/_decodeOne") {
816814
var validLengthCounts = [ 0, 0, 0, 0, 0 ]
817815
var maximalSubpartCounts = [ 0, 0, 0, 0, 0 ]
818816
func countValidSequences(
819-
head head: CountableClosedRange<UInt32>, tail: CountableClosedRange<UInt32>
817+
head: CountableClosedRange<UInt32>, tail: CountableClosedRange<UInt32>
820818
) {
821819
for cu0 in head {
822820
for rest in tail {
@@ -2157,6 +2155,9 @@ UnicodeAPIs.test("transcode/ReferenceTypedArray") {
21572155
expectEqual(input, transcoded)
21582156
}
21592157

2158+
#if _runtime(_ObjC)
2159+
import Foundation
2160+
21602161
// The most simple subclass of NSString that CoreFoundation does not know
21612162
// about.
21622163
class NonContiguousNSString : NSString {
@@ -2461,5 +2462,7 @@ StringTests.test("StreamableConformance") {
24612462
}
24622463
}
24632464

2465+
#endif // _runtime(_ObjC)
2466+
24642467
runAllTests()
24652468

0 commit comments

Comments
 (0)