Skip to content

Commit 2839e78

Browse files
author
Lance Parker
committed
Fix Linux build
1 parent f000afe commit 2839e78

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/stdlib/Inputs/ArrayTypesAndHelpers.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import Swift
2-
import Darwin
32
import StdlibUnittest
43
import Foundation
4+
#if _runtime(_ObjC)
5+
import Darwin
6+
#endif
7+
8+
9+
#if _runtime(_ObjC)
510

611
/// Expect some number of autoreleased value objects.
712
///
@@ -16,8 +21,6 @@ func expectAutoreleasedValues(
1621
_expectAutoreleasedKeysAndValues(opt: (0, opt), unopt: (0, unopt))
1722
}
1823

19-
#if _runtime(_ObjC)
20-
2124
func isNativeNSArray(_ d: NSArray) -> Bool {
2225
let className: NSString = NSStringFromClass(type(of: d)) as NSString
2326
return ["_SwiftDeferredNSArray", "_ContiguousArray", "_EmptyArray"].contains {
@@ -120,6 +123,7 @@ func < (
120123
return lhsElements.lexicographicallyPrecedes(rhsElements)
121124
}
122125

126+
#if _runtime(_ObjC)
123127
func _checkArrayFastEnumerationImpl(
124128
_ expected: [Int],
125129
_ a: NSArray,
@@ -156,6 +160,7 @@ func < (
156160
expectEqualSequence(expectedContents, actualContents)
157161
}
158162
}
163+
#endif
159164

160165
func getCOWFastArray() -> Array<Int> {
161166
var a = Array<Int>()

0 commit comments

Comments
 (0)