Skip to content

Commit

Permalink
Change return type of StadardStreams.out and .error to OutputStream (…
Browse files Browse the repository at this point in the history
…from FIleOutputStream).
  • Loading branch information
tonystone committed Jan 26, 2019
1 parent 1dc239b commit b1be373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ internal enum Standard {

/// Standard output (stdout)
///
static var out: FileOutputStream { // FIXME: change to OutputStream
static var out: OutputStream {
return FileOutputStream(fileDescriptor: STDOUT_FILENO, closeFd: false)
}

/// Standard error (stderr)
///
static var error: FileOutputStream { // FIXME: change to OutputStream
static var error: OutputStream {
return FileOutputStream(fileDescriptor: STDERR_FILENO, closeFd: false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,4 @@ class StandardStreamTests: XCTestCase {
func testErrorIsOutputStream() {
XCTAssertTrue((Standard.error as Any) is TraceLog.OutputStream)
}

func testOutPosition() {
XCTAssertEqual(Standard.out.position, 0)
}

func testErrorPosition() {
XCTAssertEqual(Standard.error.position, 0)
}
}

0 comments on commit b1be373

Please sign in to comment.