         return rnd
     }
 
-    func testDispatchFile() {
+    func testDispatchFile() throws {
         
         weak var xpc = expectation(description: #function)
 
         let file = #file
         var view = String.UnicodeScalarView()
-            var encoding = UTF8()
+        var encoding = UTF8()
 
         let high = Int(rnd(1024)) + 10
             // high=2 => decoding error

    case openError(Int32, String)
}

func channelZFile(_ path: String, queue: DispatchQueue = DispatchQueue.global(qos: .default), low: Int? = nil, high: Int? = nil, interval: DispatchTimeInterval? = nil, strict: Bool = false) -> Channel<DispatchIO, InputStreamEvent> {
    let receivers = ReceiverQueue<InputStreamEvent>()


        waitForExpectations(timeout: 30, handler: { err in })

        let swstr = String(view)
        let filestr = try String(contentsOfFile: file, encoding: String.Encoding.utf8)

        XCTAssertTrue(filestr == swstr, "file contents (high=\(high)) did not match: \(swstr.count) vs. \(filestr.count)")
    }
}

