Skip to content

Commit

Permalink
bumped min macOS to 11, fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoimer committed Aug 7, 2023
1 parent e1436a2 commit 26e0a73
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let package = Package(
name: "Toolbox",
platforms: [
.iOS(.v14),
.macOS(.v10_15)
.macOS(.v11)
],
products: [
.library(
Expand Down
22 changes: 4 additions & 18 deletions Tests/ToolboxTests/NavigationCoordinatorTests.swift
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
#if canImport(UIKit)

@testable import Toolbox
import XCTest

final class NavigationCoordinatorTests: XCTestCase {

func testNavigationCoordinatorInitialization() async throws {
let expectation = XCTestExpectation(description: "NavigationCoordinator initialization")

// Switch to the main actor context.
await MainActor.run {
let navCoordinator = NavigationCoordinator(navigationController: .init())

// Test your coordinator instance here, e.g.:
XCTAssertNotNil(navCoordinator)

// Fulfill the expectation when the test is complete.
expectation.fulfill()
}

// Wait for the expectation to be fulfilled.
await fulfillment(of: [expectation], timeout: 10)
}

func testNavigationCoordinatorRootIsUINavigationController() async throws {
let expectation = XCTestExpectation(description: "NavigationCoordinator initialization")
Expand All @@ -43,3 +27,5 @@ final class NavigationCoordinatorTests: XCTestCase {
}

}

#endif
22 changes: 4 additions & 18 deletions Tests/ToolboxTests/TabBarCoordinatorTests.swift
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
#if canImport(UIKit)

@testable import Toolbox
import XCTest

final class TabBarCoordinatorTests: XCTestCase {

func testTabBarCoordinatorInitialization() async throws {
let expectation = XCTestExpectation(description: "TabBarCoordinator initialization")

// Switch to the main actor context.
await MainActor.run {
let mainCoordinator = TabBarCoordinator()

// Test your coordinator instance here, e.g.:
XCTAssertNotNil(mainCoordinator)

// Fulfill the expectation when the test is complete.
expectation.fulfill()
}

// Wait for the expectation to be fulfilled.
await fulfillment(of: [expectation], timeout: 10)
}

func testTabBarCoordinatorRootIsUITabBarController() async throws {
let expectation = XCTestExpectation(description: "TabBarCoordinator initialization")
Expand All @@ -42,3 +26,5 @@ final class TabBarCoordinatorTests: XCTestCase {
await fulfillment(of: [expectation], timeout: 10)
}
}

#endif
4 changes: 4 additions & 0 deletions Tests/ToolboxTests/UIColorTests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if canImport(UIKit)

import UIKit
@testable import Toolbox
import XCTest
Expand Down Expand Up @@ -64,3 +66,5 @@ final class UIColorTests: XCTestCase {
XCTAssertEqual(color.toHexString().uppercased(), "#ABCDEF")
}
}

#endif

0 comments on commit 26e0a73

Please sign in to comment.