From 709112d17ac9f61060b28c86d61d3f0f9b66c08a Mon Sep 17 00:00:00 2001 From: Sacha DSO Date: Tue, 5 Mar 2024 22:28:28 -1000 Subject: [PATCH] Bumps to swift 5.9 --- Package.swift | 8 ++++---- Tests/ThenTests/RegisterThenTests.swift | 20 +++++++++++--------- Tests/ThenTests/ThenTests.swift | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Package.swift b/Package.swift index 2ed9ccce95..48351519b6 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// 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 @@ -6,9 +6,9 @@ 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: [ diff --git a/Tests/ThenTests/RegisterThenTests.swift b/Tests/ThenTests/RegisterThenTests.swift index 8b3b5469b4..730eb1d1a1 100644 --- a/Tests/ThenTests/RegisterThenTests.swift +++ b/Tests/ThenTests/RegisterThenTests.swift @@ -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() @@ -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) } diff --git a/Tests/ThenTests/ThenTests.swift b/Tests/ThenTests/ThenTests.swift index 7ed287a626..280e08153a 100644 --- a/Tests/ThenTests/ThenTests.swift +++ b/Tests/ThenTests/ThenTests.swift @@ -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