Skip to content

Moves XCTestCase.validate into its own module #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions Tests/AsyncAlgorithmsTests/TestValidationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import XCTest
import AsyncAlgorithms
import AsyncSequenceValidation
@testable import AsyncAlgorithms_XCTest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this prevents us from doing release-mode testing of perf. I am of the belief that this DEFINITELY should be tested, but we kinda need to settle on a way to do this AND accommodate for testing performance too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually didn't realize that this prevents that. I thought about moving the tests to their own test target for the new module, but they depend on other types in the AsyncAlgorithmsTests module and I tried to make as few changes as possible. I guess making more of the methods in the extension doesn't feel like a good solution either?


final class TestValidationDiagram: XCTestCase {
func test_diagram() {
Expand Down