@@ -43,7 +43,6 @@ class ThenableTests: XCTestCase {
4343 wait ( for: [ ex] , timeout: 10 )
4444 }
4545
46- #if swift(>=4) && !swift(>=5.2)
4746 func testMapByKeyPath( ) {
4847 let ex = expectation ( description: " " )
4948 Promise . value ( Person ( name: " Max " ) ) . map ( \. name) . done {
@@ -52,7 +51,6 @@ class ThenableTests: XCTestCase {
5251 } . silenceWarning ( )
5352 wait ( for: [ ex] , timeout: 10 )
5453 }
55- #endif
5654
5755 func testCompactMap( ) {
5856 let ex = expectation ( description: " " )
@@ -110,7 +108,6 @@ class ThenableTests: XCTestCase {
110108 wait ( for: [ ex] , timeout: 10 )
111109 }
112110
113- #if swift(>=4) && !swift(>=5.2)
114111 func testCompactMapByKeyPath( ) {
115112 let ex = expectation ( description: " " )
116113 Promise . value ( Person ( name: " Roman " , age: 26 ) ) . compactMap ( \. age) . done {
@@ -119,7 +116,6 @@ class ThenableTests: XCTestCase {
119116 } . silenceWarning ( )
120117 wait ( for: [ ex] , timeout: 10 )
121118 }
122- #endif
123119
124120 func testMapValues( ) {
125121 let ex = expectation ( description: " " )
@@ -132,7 +128,6 @@ class ThenableTests: XCTestCase {
132128 wait ( for: [ ex] , timeout: 10 )
133129 }
134130
135- #if swift(>=4) && !swift(>=5.2)
136131 func testMapValuesByKeyPath( ) {
137132 let ex = expectation ( description: " " )
138133 Promise . value ( [ Person ( name: " Max " ) , Person ( name: " Roman " ) , Person ( name: " John " ) ] ) . mapValues ( \. name) . done {
@@ -141,7 +136,6 @@ class ThenableTests: XCTestCase {
141136 } . silenceWarning ( )
142137 wait ( for: [ ex] , timeout: 10 )
143138 }
144- #endif
145139
146140 func testCompactMapValues( ) {
147141 let ex = expectation ( description: " " )
@@ -154,7 +148,6 @@ class ThenableTests: XCTestCase {
154148 wait ( for: [ ex] , timeout: 10 )
155149 }
156150
157- #if swift(>=4) && !swift(>=5.2)
158151 func testCompactMapValuesByKeyPath( ) {
159152 let ex = expectation ( description: " " )
160153 Promise . value ( [ Person ( name: " Max " ) , Person ( name: " Roman " , age: 26 ) , Person ( name: " John " , age: 23 ) ] ) . compactMapValues ( \. age) . done {
@@ -163,7 +156,6 @@ class ThenableTests: XCTestCase {
163156 } . silenceWarning ( )
164157 wait ( for: [ ex] , timeout: 10 )
165158 }
166- #endif
167159
168160 func testThenMap( ) {
169161 let ex = expectation ( description: " " )
@@ -198,7 +190,6 @@ class ThenableTests: XCTestCase {
198190 wait ( for: [ ex] , timeout: 10 )
199191 }
200192
201- #if swift(>=4) && !swift(>=5.2)
202193 func testFilterValuesByKeyPath( ) {
203194 let ex = expectation ( description: " " )
204195 Promise . value ( [ Person ( name: " Max " ) , Person ( name: " Roman " , age: 26 , isStudent: false ) , Person ( name: " John " , age: 23 , isStudent: true ) ] ) . filterValues ( \. isStudent) . done {
@@ -207,8 +198,7 @@ class ThenableTests: XCTestCase {
207198 } . silenceWarning ( )
208199 wait ( for: [ ex] , timeout: 10 )
209200 }
210- #endif
211-
201+
212202 func testLastValueForEmpty( ) {
213203 XCTAssertTrue ( Promise . value ( [ ] ) . lastValue. isRejected)
214204 }
0 commit comments