                        "\(FileHandle.readCompletionNotification.rawValue) is not equal to NSFileHandleReadCompletionNotification")
     }
 
+#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
     func test_nullDevice() {
         let fh = FileHandle.nullDevice
 
-        XCTAssertEqual(fh.fileDescriptor, -1)
+        XCTAssertFalse(fh._isPlatformHandleValid)
         fh.closeFile()
         fh.seek(toFileOffset: 10)
         XCTAssertEqual(fh.offsetInFile, 0)

        fh.seek(toFileOffset: 0)
        XCTAssertEqual(fh.readDataToEndOfFile().count, 0)
    }

    func test_truncateFile() {
        let url: URL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(ProcessInfo.processInfo.globallyUniqueString, isDirectory: false)

#if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
        tests.append(contentsOf: [
            ("test_fileDescriptor", test_fileDescriptor),
            ("test_nullDevice", test_nullDevice),
            ("testHandleCreationAndCleanup", testHandleCreationAndCleanup),
            ("testOffset", testOffset),
        ])
