mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The macro tests were all using "REQUIRES: OS=macosx" as a proxy for "have the Swift Swift parser". There was an existing feature for this, but it was just checking whether the path was passed through. Fix that to use the same variable as in CMake. Also remove all extraneous `-I` and `-L` to the host libs in the target invocations.
25 lines
627 B
Swift
25 lines
627 B
Swift
// REQUIRES: swift_swift_parser, executable_test
|
|
|
|
// RUN: %target-run-simple-swift(-Xfrontend -plugin-path -Xfrontend %swift-host-lib-dir/plugins -emit-tbd -emit-tbd-path %t.tbd)
|
|
|
|
import Swift
|
|
|
|
@OptionSet<UInt8>
|
|
struct ShippingOptions {
|
|
private enum Options: Int {
|
|
case nextDay
|
|
case secondDay
|
|
case priority
|
|
case standard
|
|
}
|
|
|
|
static let express: ShippingOptions = [.nextDay, .secondDay]
|
|
static let all: ShippingOptions = [.express, .priority, .standard]
|
|
}
|
|
|
|
let options = ShippingOptions.express
|
|
assert(options.contains(.nextDay))
|
|
assert(options.contains(.secondDay))
|
|
assert(!options.contains(.standard))
|
|
|