File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ # v15.3.0
2+
3+ - Add ` == ` operators for ` SocketAckStatus ` and ` String `
4+
15# v15.2.0
26
37- Small fixes.
Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ public enum SocketAckStatus : String {
3131
3232 /// The ack timed out.
3333 case noAck = " NO ACK "
34+
35+ /// Tests whether a string is equal to a given SocketAckStatus
36+ public static func == ( lhs: String , rhs: SocketAckStatus ) -> Bool {
37+ return lhs == rhs. rawValue
38+ }
39+
40+ /// Tests whether a string is equal to a given SocketAckStatus
41+ public static func == ( lhs: SocketAckStatus , rhs: String ) -> Bool {
42+ return rhs == lhs
43+ }
3444}
3545
3646private struct SocketAck : Hashable {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class SocketAckManagerTest : XCTestCase {
3838 return
3939 }
4040
41- XCTAssertEqual ( timeoutReason, SocketAckStatus . noAck. rawValue )
41+ XCTAssert ( timeoutReason == SocketAckStatus . noAck)
4242
4343 callbackExpection. fulfill ( )
4444 }
You can’t perform that action at this time.
0 commit comments