Skip to content

Commit

Permalink
Bumps to swift 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
s4cha committed Mar 6, 2024
1 parent a12b6a2 commit 709112d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// swift-tools-version:5.6
// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Then",
platforms: [
.iOS(.v9),
.macOS(.v10_12),
.tvOS(.v10),
.iOS(.v12),
.macOS(.v10_13),
.tvOS(.v12),
.watchOS(.v6)
],
products: [
Expand Down
20 changes: 11 additions & 9 deletions Tests/ThenTests/RegisterThenTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ class RegisterThenTests: XCTestCase {

let thenExpectation = expectation(description: "thenExpectation")
fetchUserId()
.registerThen { _ in
.registerThen { _ -> Void in
XCTAssertTrue(count == 0)
count+=1
block1.fulfill()
}.registerThen {_ in
}.registerThen {_ -> Void in
XCTAssertTrue(count == 1)
count+=1
block2.fulfill()
}.registerThen {_ in
}.registerThen {_ -> Void in
XCTAssertTrue(count == 2)
count+=1
block3.fulfill()
Expand Down Expand Up @@ -155,26 +155,28 @@ class RegisterThenTests: XCTestCase {

let thenExpectation = expectation(description: "thenExpectation")
fetchUserId()
.registerThen { _ in
.registerThen { _ -> Void in
XCTAssertTrue(count == 0)
count+=1
block1.fulfill()
}.registerThen {_ in
}.registerThen {_ -> Void in
XCTAssertTrue(count == 1)
count+=1
block2.fulfill()
}.registerThen {_ in
}.registerThen { _ -> Void in
XCTAssertTrue(count == 2)
count+=1
block3.fulfill()
}.then { name in
}
.then { name in
XCTAssertTrue(count == 3)
count+=1
print("name :\(name)")
thenExpectation.fulfill()
}.then { _ -> Void in
}
.then { _ -> Void in
print("Just another then block")
}
}
waitForExpectations(timeout: 0.3, handler: nil)
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/ThenTests/ThenTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ThenTests: XCTestCase {
fetchUserId()
.then(fetchUserNameFromId)
.then(fetchUserFollowStatusFromName)
.then { isFollowed in
.then { isFollowed -> Void in
XCTAssertFalse(isFollowed)
thenExpectation.fulfill()
}.onError { _ in
Expand Down

0 comments on commit 709112d

Please sign in to comment.