Files
swift-mirror/test/Interpreter/availability_host_os.swift
Mishal Shah 10dda582d6 [Apple Silicon] Update tests for no macOS target triple canonicalization
LLVM no longer canonicalizes target triples for maOS versions. Update
tests to account for this.
2020-07-02 19:30:01 -07:00

20 lines
735 B
Swift

// Note: This is deliberately testing the target-less invocation of swift(c).
// RUN: %swiftc_driver -typecheck -import-objc-header %S/Inputs/availability_host_os.h -DFAIL -Xfrontend -verify %s
// RUN: %swift_driver -import-objc-header %S/Inputs/availability_host_os.h -DFAIL -Xfrontend -verify %s
// RUN: %swift_driver -import-objc-header %S/Inputs/availability_host_os.h %s | %FileCheck %s
// REQUIRES: OS=macosx
// REQUIRES: executable_test
// REQUIRES: swift_interpreter
print(mavericks()) // CHECK: {{^9$}}
print(yosemite()) // CHECK-NEXT: {{^10$}}
#if FAIL
print(todosSantos()) // expected-error {{'todosSantos()' is only available in macOS 99.99 or newer}}
// expected-note@-1 {{add 'if #available' version check}}
#endif