Skip to content

Commit 042b2ba

Browse files
authored
Merge pull request #2247 from millenomi/build-fix-testpipe
2 parents 120f749 + da0cd6d commit 042b2ba

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Foundation/FileHandle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ open class FileHandle : NSObject {
5757
precondition(_handle != INVALID_HANDLE_VALUE, "Invalid file handle")
5858
}
5959

60-
private var _isPlatformHandleValid: Bool {
60+
internal var _isPlatformHandleValid: Bool {
6161
return _handle != INVALID_HANDLE_VALUE
6262
}
6363
#else
@@ -71,7 +71,7 @@ open class FileHandle : NSObject {
7171
precondition(_fd >= 0, "Bad file descriptor")
7272
}
7373

74-
private var _isPlatformHandleValid: Bool {
74+
internal var _isPlatformHandleValid: Bool {
7575
return fileDescriptor >= 0
7676
}
7777
#endif

TestFoundation/TestPipe.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10+
#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
11+
#if canImport(SwiftFoundation) && !DEPLOYMENT_RUNTIME_OBJC
12+
@testable import SwiftFoundation
13+
#else
14+
@testable import Foundation
15+
#endif
16+
#endif
17+
1018
#if !DARWIN_COMPATIBILITY_TESTS // Disable until Foundation has the new FileHandle API
1119
class TestPipe: XCTestCase {
1220

0 commit comments

Comments
 (0)