Skip to content

Commit

Permalink
Removed Socket.Error.aa thing
Browse files Browse the repository at this point in the history
  • Loading branch information
OrkhanAlikhanov committed Dec 15, 2017
1 parent 826a218 commit bb77260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions Sources/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@ extension Socket {
}
}
}

extension Socket.Error {
public static let aa = Socket.Error(errno: 13)
}
8 changes: 2 additions & 6 deletions Tests/SocketSwiftTests/SocketSwiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,8 @@ class SocketSwiftTests: XCTestCase {
}

func testError() {
do {
_ = try Socket.tcpListening(port: 80)
} catch let error where (error as! Socket.Error) == Socket.Error.aa {
print(error)
} catch {
print("baddd")
XCTAssertThrowsError(try Socket.tcpListening(port: 80), "Should throw permission denied") { err in
XCTAssertEqual(err as? Socket.Error, Socket.Error(errno: EACCES))
}
}

Expand Down

0 comments on commit bb77260

Please sign in to comment.