Skip to content

Stop using the SWIFT_PM_SUPPORTS_SWIFT_TESTING flag. #376

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 1 commit into from
Apr 26, 2024
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
6 changes: 3 additions & 3 deletions Sources/Testing/Running/XCTestScaffold.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extension XCTIssue {
/// ## See Also
///
/// - <doc:TemporaryGettingStarted>
#if SWIFT_PM_SUPPORTS_SWIFT_TESTING
#if compiler(>=5.11)
@available(*, deprecated, message: "This version of Swift Package Manager supports running swift-testing tests directly. This type will be removed in a future release.")
#else
@available(swift, deprecated: 100000.0, message: "This type is provided temporarily to aid in integrating the testing library with existing tools such as Swift Package Manager. It will be removed in a future release.")
Expand Down Expand Up @@ -109,13 +109,13 @@ public enum XCTestScaffold: Sendable {
/// ## See Also
///
/// - <doc:TemporaryGettingStarted>
#if SWIFT_PM_SUPPORTS_SWIFT_TESTING
#if compiler(>=5.11)
@available(*, deprecated, message: "This version of Swift Package Manager supports running swift-testing tests directly. This function has no effect and will be removed in a future release.")
#else
@available(swift, deprecated: 100000.0, message: "This function is provided temporarily to aid in integrating the testing library with existing tools such as Swift Package Manager. It will be removed in a future release.")
#endif
public static func runAllTests(hostedBy testCase: XCTestCase, _ functionName: String = #function) async {
#if SWIFT_PM_SUPPORTS_SWIFT_TESTING
#if compiler(>=5.11)
let message = Event.ConsoleOutputRecorder.warning(
"This version of Swift Package Manager supports running swift-testing tests directly. Ignoring call to \(#function).",
options: .for(.stderr)
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingMacrosTests/TestSupport/Scaffolding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

#if !SWT_NO_XCTEST_SCAFFOLDING && !SWIFT_PM_SUPPORTS_SWIFT_TESTING && canImport(XCTest)
#if !SWT_NO_XCTEST_SCAFFOLDING && compiler(<5.11) && canImport(XCTest)
import XCTest
import Testing

Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/ExitTestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private import TestingInternals
#endif
}

#if SWIFT_PM_SUPPORTS_SWIFT_TESTING
#if compiler(>=5.11)
@Test("Exit tests (failing)") func failing() async {
let expectedCount: Int
#if os(Windows)
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/TestSupport/Scaffolding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

#if !SWT_NO_XCTEST_SCAFFOLDING && !SWIFT_PM_SUPPORTS_SWIFT_TESTING && canImport(XCTest)
#if !SWT_NO_XCTEST_SCAFFOLDING && compiler(<5.11) && canImport(XCTest)
import XCTest
import Testing

Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Traits/TagListTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ struct TagListTests {
#expect(Tag.Color.rgb(0, 0, 0) < .rgb(100, 100, 100))
}

#if !SWT_NO_EXIT_TESTS && SWIFT_PM_SUPPORTS_SWIFT_TESTING && !canImport(SwiftSyntax600)
#if !SWT_NO_EXIT_TESTS && compiler(>=5.11) && !canImport(SwiftSyntax600)
@Test("Invalid symbolic tag declaration")
func invalidSymbolicTag() async {
await #expect(exitsWith: .failure) {
Expand Down