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
+
1
5
# v15.2.0
2
6
3
7
- Small fixes.
Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ public enum SocketAckStatus : String {
31
31
32
32
/// The ack timed out.
33
33
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
+ }
34
44
}
35
45
36
46
private struct SocketAck : Hashable {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class SocketAckManagerTest : XCTestCase {
38
38
return
39
39
}
40
40
41
- XCTAssertEqual ( timeoutReason, SocketAckStatus . noAck. rawValue )
41
+ XCTAssert ( timeoutReason == SocketAckStatus . noAck)
42
42
43
43
callbackExpection. fulfill ( )
44
44
}
You can’t perform that action at this time.
0 commit comments