swiftlang / swift-testing

A modern, expressive testing package for Swift
Apache License 2.0
1.81k stars 77 forks source link

Add support for platform-specific unconditional availability. #807

Closed grynspan closed 2 weeks ago

grynspan commented 2 weeks ago

This PR adds support for the following variant of @available:

@available(macOS, unavailable)
@Test func f() {}

Previously, we were simply ignoring these availability attributes.

Resolves rdar://137776333.

Checklist:

grynspan commented 2 weeks ago

@swift-ci test

stmontgomery commented 2 weeks ago

We should consider adding this to some DocC article as a recommended workflow for disabling a test on an entire platform, as an alternative to .enabled(if: ...) in that situation.