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
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import PackageDescription
55
66let package = Package (
77 name: " Then " ,
88 platforms: [
9- . iOS( . v9 ) ,
10- . macOS( . v10_12 ) ,
11- . tvOS( . v10 ) ,
9+ . iOS( . v12 ) ,
10+ . macOS( . v10_13 ) ,
11+ . tvOS( . v12 ) ,
1212 . watchOS( . v6)
1313 ] ,
1414 products: [
Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ class RegisterThenTests: XCTestCase {
6868
6969 let thenExpectation = expectation ( description: " thenExpectation " )
7070 fetchUserId ( )
71- . registerThen { _ in
71+ . registerThen { _ -> Void in
7272 XCTAssertTrue ( count == 0 )
7373 count+= 1
7474 block1. fulfill ( )
75- } . registerThen { _ in
75+ } . registerThen { _ -> Void in
7676 XCTAssertTrue ( count == 1 )
7777 count+= 1
7878 block2. fulfill ( )
79- } . registerThen { _ in
79+ } . registerThen { _ -> Void in
8080 XCTAssertTrue ( count == 2 )
8181 count+= 1
8282 block3. fulfill ( )
@@ -155,26 +155,28 @@ class RegisterThenTests: XCTestCase {
155155
156156 let thenExpectation = expectation ( description: " thenExpectation " )
157157 fetchUserId ( )
158- . registerThen { _ in
158+ . registerThen { _ -> Void in
159159 XCTAssertTrue ( count == 0 )
160160 count+= 1
161161 block1. fulfill ( )
162- } . registerThen { _ in
162+ } . registerThen { _ -> Void in
163163 XCTAssertTrue ( count == 1 )
164164 count+= 1
165165 block2. fulfill ( )
166- } . registerThen { _ in
166+ } . registerThen { _ -> Void in
167167 XCTAssertTrue ( count == 2 )
168168 count+= 1
169169 block3. fulfill ( )
170- } . then { name in
170+ }
171+ . then { name in
171172 XCTAssertTrue ( count == 3 )
172173 count+= 1
173174 print ( " name : \( name) " )
174175 thenExpectation. fulfill ( )
175- } . then { _ -> Void in
176+ }
177+ . then { _ -> Void in
176178 print ( " Just another then block " )
177- }
179+ }
178180 waitForExpectations ( timeout: 0.3 , handler: nil )
179181 }
180182
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ThenTests: XCTestCase {
2020 fetchUserId ( )
2121 . then ( fetchUserNameFromId)
2222 . then ( fetchUserFollowStatusFromName)
23- . then { isFollowed in
23+ . then { isFollowed -> Void in
2424 XCTAssertFalse ( isFollowed)
2525 thenExpectation. fulfill ( )
2626 } . onError { _ in
You can’t perform that action at this time.
0 commit comments