From c2ca7fd62a499b962aa32fbd0da1500dca7db927 Mon Sep 17 00:00:00 2001 From: Kristoffer Johansson Date: Sat, 2 Apr 2022 09:02:17 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Move=20XCTestCase.validate=20into=20it?= =?UTF-8?q?=E2=80=99s=20own=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Package.swift | 13 +++++++++++-- .../AsyncAlgorithms_XCTest}/ValidationTest.swift | 0 Tests/AsyncAlgorithmsTests/TestThrottle.swift | 1 + .../AsyncAlgorithmsTests/TestValidationTests.swift | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) rename {Tests/AsyncAlgorithmsTests/Support => Sources/AsyncAlgorithms_XCTest}/ValidationTest.swift (100%) diff --git a/Package.swift b/Package.swift index 088e9654..fd3a36fc 100644 --- a/Package.swift +++ b/Package.swift @@ -13,7 +13,8 @@ let package = Package( products: [ .library(name: "AsyncAlgorithms", targets: ["AsyncAlgorithms"]), .library(name: "AsyncSequenceValidation", targets: ["AsyncSequenceValidation"]), - .library(name: "_CAsyncSequenceValidationSupport", type: .static, targets: ["AsyncSequenceValidation"]) + .library(name: "_CAsyncSequenceValidationSupport", type: .static, targets: ["AsyncSequenceValidation"]), + .library(name: "AsyncAlgorithms_XCTest", targets: ["AsyncAlgorithms_XCTest"]), ], dependencies: [], targets: [ @@ -22,9 +23,17 @@ let package = Package( name: "AsyncSequenceValidation", dependencies: ["_CAsyncSequenceValidationSupport", "AsyncAlgorithms"]), .systemLibrary(name: "_CAsyncSequenceValidationSupport"), + .target( + name: "AsyncAlgorithms_XCTest", + dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation"], + swiftSettings: [ + .unsafeFlags([ + "-Xfrontend", "-disable-availability-checking" + ]) + ]), .testTarget( name: "AsyncAlgorithmsTests", - dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation"], + dependencies: ["AsyncAlgorithms", "AsyncSequenceValidation", "AsyncAlgorithms_XCTest"], swiftSettings: [ .unsafeFlags([ "-Xfrontend", "-disable-availability-checking" diff --git a/Tests/AsyncAlgorithmsTests/Support/ValidationTest.swift b/Sources/AsyncAlgorithms_XCTest/ValidationTest.swift similarity index 100% rename from Tests/AsyncAlgorithmsTests/Support/ValidationTest.swift rename to Sources/AsyncAlgorithms_XCTest/ValidationTest.swift diff --git a/Tests/AsyncAlgorithmsTests/TestThrottle.swift b/Tests/AsyncAlgorithmsTests/TestThrottle.swift index 972f04c1..1cf772e6 100644 --- a/Tests/AsyncAlgorithmsTests/TestThrottle.swift +++ b/Tests/AsyncAlgorithmsTests/TestThrottle.swift @@ -11,6 +11,7 @@ import XCTest import AsyncAlgorithms +import AsyncAlgorithms_XCTest final class TestThrottle: XCTestCase { func test_rate_0() { diff --git a/Tests/AsyncAlgorithmsTests/TestValidationTests.swift b/Tests/AsyncAlgorithmsTests/TestValidationTests.swift index 2f42c5f2..f60259c1 100644 --- a/Tests/AsyncAlgorithmsTests/TestValidationTests.swift +++ b/Tests/AsyncAlgorithmsTests/TestValidationTests.swift @@ -12,6 +12,7 @@ import XCTest import AsyncAlgorithms import AsyncSequenceValidation +@testable import AsyncAlgorithms_XCTest final class TestValidationDiagram: XCTestCase { func test_diagram() { From 9e14788fb558f04b0e623ebda0f2d63eeedb0ea3 Mon Sep 17 00:00:00 2001 From: Kristoffer Johansson Date: Tue, 5 Apr 2022 17:25:48 +0200 Subject: [PATCH 2/2] Remove unnecessary import statement --- Tests/AsyncAlgorithmsTests/TestThrottle.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/AsyncAlgorithmsTests/TestThrottle.swift b/Tests/AsyncAlgorithmsTests/TestThrottle.swift index 1cf772e6..972f04c1 100644 --- a/Tests/AsyncAlgorithmsTests/TestThrottle.swift +++ b/Tests/AsyncAlgorithmsTests/TestThrottle.swift @@ -11,7 +11,6 @@ import XCTest import AsyncAlgorithms -import AsyncAlgorithms_XCTest final class TestThrottle: XCTestCase { func test_rate_0() {