File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
- // swift-tools-version:5.6
1
+ // swift-tools-version:5.9
2
2
// The swift-tools-version declares the minimum version of Swift required to build this package.
3
3
4
4
import PackageDescription
5
5
6
6
let package = Package (
7
7
name: " Then " ,
8
8
platforms: [
9
- . iOS( . v9 ) ,
10
- . macOS( . v10_12 ) ,
11
- . tvOS( . v10 ) ,
9
+ . iOS( . v12 ) ,
10
+ . macOS( . v10_13 ) ,
11
+ . tvOS( . v12 ) ,
12
12
. watchOS( . v6)
13
13
] ,
14
14
products: [
Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ class RegisterThenTests: XCTestCase {
68
68
69
69
let thenExpectation = expectation ( description: " thenExpectation " )
70
70
fetchUserId ( )
71
- . registerThen { _ in
71
+ . registerThen { _ -> Void in
72
72
XCTAssertTrue ( count == 0 )
73
73
count+= 1
74
74
block1. fulfill ( )
75
- } . registerThen { _ in
75
+ } . registerThen { _ -> Void in
76
76
XCTAssertTrue ( count == 1 )
77
77
count+= 1
78
78
block2. fulfill ( )
79
- } . registerThen { _ in
79
+ } . registerThen { _ -> Void in
80
80
XCTAssertTrue ( count == 2 )
81
81
count+= 1
82
82
block3. fulfill ( )
@@ -155,26 +155,28 @@ class RegisterThenTests: XCTestCase {
155
155
156
156
let thenExpectation = expectation ( description: " thenExpectation " )
157
157
fetchUserId ( )
158
- . registerThen { _ in
158
+ . registerThen { _ -> Void in
159
159
XCTAssertTrue ( count == 0 )
160
160
count+= 1
161
161
block1. fulfill ( )
162
- } . registerThen { _ in
162
+ } . registerThen { _ -> Void in
163
163
XCTAssertTrue ( count == 1 )
164
164
count+= 1
165
165
block2. fulfill ( )
166
- } . registerThen { _ in
166
+ } . registerThen { _ -> Void in
167
167
XCTAssertTrue ( count == 2 )
168
168
count+= 1
169
169
block3. fulfill ( )
170
- } . then { name in
170
+ }
171
+ . then { name in
171
172
XCTAssertTrue ( count == 3 )
172
173
count+= 1
173
174
print ( " name : \( name) " )
174
175
thenExpectation. fulfill ( )
175
- } . then { _ -> Void in
176
+ }
177
+ . then { _ -> Void in
176
178
print ( " Just another then block " )
177
- }
179
+ }
178
180
waitForExpectations ( timeout: 0.3 , handler: nil )
179
181
}
180
182
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ThenTests: XCTestCase {
20
20
fetchUserId ( )
21
21
. then ( fetchUserNameFromId)
22
22
. then ( fetchUserFollowStatusFromName)
23
- . then { isFollowed in
23
+ . then { isFollowed -> Void in
24
24
XCTAssertFalse ( isFollowed)
25
25
thenExpectation. fulfill ( )
26
26
} . onError { _ in
You can’t perform that action at this time.
0 commit comments