Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement logic to handle partial writes. #76

Merged
merged 6 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix .unknowError tests for OutputStreamError+PosixTests.swift.
  • Loading branch information
tonystone committed Jan 23, 2019
commit cb1e47607a8cbf33e171d1bde66f012f867b549d
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import XCTest
import Glibc
#endif


class OutputStreamErrorPosixTests: XCTestCase {

func testErrorForOutOfRangeCode() {
Expand Down Expand Up @@ -209,7 +208,7 @@ class OutputStreamErrorPosixTests: XCTestCase {
/// of Swift the message is slightly different between
/// Darwin and Linux.
///
if case .unknownError(let code, _) = FileOutputStreamError.error(for: EAGAIN) {
if case .unknownError(let code, _) = OutputStreamError.error(for: EAGAIN) {
XCTAssertEqual(code, EAGAIN)
} else {
XCTFail(".unknownError was expected")
Expand All @@ -224,7 +223,7 @@ class OutputStreamErrorPosixTests: XCTestCase {
/// of Swift the message is slightly different between
/// Darwin and Linux.
///
if case .unknownError(let code, _) = FileOutputStreamError.error(for: EWOULDBLOCK) {
if case .unknownError(let code, _) = OutputStreamError.error(for: EWOULDBLOCK) {
XCTAssertEqual(code, EWOULDBLOCK)
} else {
XCTFail(".unknownError was expected")
Expand All @@ -239,12 +238,11 @@ class OutputStreamErrorPosixTests: XCTestCase {
/// of Swift the message is slightly different between
/// Darwin and Linux.
///
if case .unknownError(let code, _) = FileOutputStreamError.error(for: EINTR) {
if case .unknownError(let code, _) = OutputStreamError.error(for: EINTR) {
XCTAssertEqual(code, EINTR)
} else {
XCTFail(".unknownError was expected")
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import XCTest
["EINTR", "unknownError", "Interrupted system call"]
]
}%

class OutputStreamErrorPosixTests: XCTestCase {

func testErrorForOutOfRangeCode() {
Expand Down Expand Up @@ -95,13 +94,12 @@ class OutputStreamErrorPosixTests: XCTestCase {
/// of Swift the message is slightly different between
/// Darwin and Linux.
///
if case .${CaseValue}(let code, _) = FileOutputStreamError.error(for: ${CodeConstant}) {
if case .${CaseValue}(let code, _) = OutputStreamError.error(for: ${CodeConstant}) {
XCTAssertEqual(code, ${CodeConstant})
} else {
XCTFail(".${CaseValue} was expected")
}
}

% end

}