mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Most tests were using %swift or similar substitutions, which did not include the target triple and SDK. The driver was defaulting to the host OS. Thus, we could not run the tests when the standard library was not built for OS X. Swift SVN r24504
18 lines
502 B
Swift
18 lines
502 B
Swift
// RUN: %target-parse-verify-swift
|
|
|
|
func test1() {
|
|
var a : Int {
|
|
#if arch(x86_64)
|
|
return 0
|
|
#else
|
|
return 1
|
|
#endif
|
|
}
|
|
}
|
|
|
|
// Would trigger assertion when AST verifier checks source ranges ("child source range not contained within its parent")
|
|
func test2() { // expected-note {{match}}
|
|
var a : Int { // expected-note {{match}}
|
|
switch i { // expected-error {{unresolved identifier}}
|
|
} // expected-error {{'switch' statement body must have at least one}}
|
|
// expected-error 2 {{expected '}'}} |