From 94a7ecec28d40d34004acc3cdc8340e6313c2f03 Mon Sep 17 00:00:00 2001 From: Kristoffer Johansson Date: Fri, 8 Apr 2022 23:15:55 +0200 Subject: [PATCH] Moves `XCTestCase.validate` into its own module (#135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Move XCTestCase.validate into it’s own module * Remove unnecessary import statement --- Package.swift | 13 +++++++++++-- .../AsyncAlgorithms_XCTest}/ValidationTest.swift | 0 .../AsyncAlgorithmsTests/TestValidationTests.swift | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) rename {Tests/AsyncAlgorithmsTests/Support => Sources/AsyncAlgorithms_XCTest}/ValidationTest.swift (100%) diff --git a/Package.swift b/Package.swift index 088e965..fd3a36f 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/TestValidationTests.swift b/Tests/AsyncAlgorithmsTests/TestValidationTests.swift index 2f42c5f..f60259c 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() {