Skip to content

Explicitly add visionOS availability to tests that check availability. #424

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
May 21, 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
4 changes: 2 additions & 2 deletions Tests/TestingTests/EventRecorderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ struct EventRecorderTests {
func unavailablePigeon() {}

@Test("Future Grouse", .hidden)
@available(macOS 999.0, iOS 999.0, watchOS 999.0, tvOS 999.0, *)
@available(macOS 999.0, iOS 999.0, watchOS 999.0, tvOS 999.0, visionOS 999.0, *)
func futureGrouse() {}

@Test("Future Goose", .hidden)
@available(macOS 999, iOS 999, watchOS 999, tvOS 999, *)
@available(macOS 999, iOS 999, watchOS 999, tvOS 999, visionOS 999.0, *)
func futureGoose() {}

@Test("Future Mouse", .hidden)
Expand Down
10 changes: 8 additions & 2 deletions Tests/TestingTests/RunnerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -615,20 +615,21 @@ final class RunnerTests: XCTestCase {

#if SWT_TARGET_OS_APPLE
@Test(.hidden)
@available(macOS 999.0, iOS 999.0, watchOS 999.0, tvOS 999.0, *)
@available(macOS 999.0, iOS 999.0, watchOS 999.0, tvOS 999.0, visionOS 999.0, *)
func futureAvailable() {}

@Test(.hidden)
@available(macOS, introduced: 999.0)
@available(iOS, introduced: 999.0)
@available(watchOS, introduced: 999.0)
@available(tvOS, introduced: 999.0)
@available(visionOS, introduced: 999.0)
func futureAvailableLongForm() {}

@Suite(.hidden)
struct U {
@Test(.hidden)
@available(macOS 999.0, iOS 999.0, watchOS 999.0, tvOS 999.0, *)
@available(macOS 999.0, iOS 999.0, watchOS 999.0, tvOS 999.0, visionOS 999.0, *)
func f() {}

@Test(.hidden)
Expand All @@ -643,6 +644,7 @@ final class RunnerTests: XCTestCase {
@available(iOS, introduced: 999.0)
@available(watchOS, introduced: 999.0)
@available(tvOS, introduced: 999.0)
@available(visionOS, introduced: 999.0)
func f() {}
}
#endif
Expand Down Expand Up @@ -677,6 +679,7 @@ final class RunnerTests: XCTestCase {
@available(iOS, introduced: 1.0, obsoleted: 999.0)
@available(watchOS, introduced: 1.0, obsoleted: 999.0)
@available(tvOS, introduced: 1.0, obsoleted: 999.0)
@available(visionOS, introduced: 1.0, obsoleted: 999.0)
func obsoleted() {}
}

Expand All @@ -702,6 +705,7 @@ final class RunnerTests: XCTestCase {
@available(iOS, introduced: 999.0, message: "Expected Message")
@available(watchOS, introduced: 999.0, message: "Expected Message")
@available(tvOS, introduced: 999.0, message: "Expected Message")
@available(visionOS, introduced: 999.0, message: "Expected Message")
func futureAvailableLongForm() {}
#endif
}
Expand Down Expand Up @@ -839,13 +843,15 @@ final class RunnerTests: XCTestCase {
@available(iOS, deprecated: 1.0)
@available(watchOS, deprecated: 1.0)
@available(tvOS, deprecated: 1.0)
@available(visionOS, deprecated: 1.0)
func deprecatedAppleCallee() {}

@Test(.hidden)
@available(macOS, deprecated: 1.0)
@available(iOS, deprecated: 1.0)
@available(watchOS, deprecated: 1.0)
@available(tvOS, deprecated: 1.0)
@available(visionOS, deprecated: 1.0)
func deprecatedApple() {
deprecatedAppleCallee()
}
Expand Down