Skip to content

Commit 3b04d1b

Browse files
committed
tests: reorganize tests so that they actually use the target platform
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
1 parent 753de15 commit 3b04d1b

File tree

1,190 files changed

+3556
-2656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,190 files changed

+3556
-2656
lines changed

test/1_stdlib/ArrayDiagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %s -parse -verify
1+
// RUN: %target-parse-verify-swift
22

33
class NotEquatable {}
44

test/1_stdlib/CharacterTypes.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify -enable-character-literals
1+
// RUN: %target-parse-verify-swift -enable-character-literals
22

33
func testTypeInference() {
44
func isUnicodeScalar(inout _: UnicodeScalar) {}

test/1_stdlib/RangeDiagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
// RUN: %swift -verify -parse %s
12+
// RUN: %target-parse-verify-swift
1313

1414
func assertCollection<C: CollectionType>(_: C) {}
1515
assertCollection(0..<10)

test/1_stdlib/StringDiagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify
1+
// RUN: %target-parse-verify-swift
22

33
// Common pitfall: trying to subscript a string with integers.
44
func testIntSubscripting(s: String, i: Int) {

test/1_stdlib/UnicodeScalarDiagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %s -parse -verify
1+
// RUN: %target-parse-verify-swift
22

33
func isString(inout s: String) {}
44

test/BuildConfigurations/basicDeclarations.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify -D FOO -D BAR -target x86_64-apple-macosx10.9
1+
// RUN: %target-parse-verify-swift -D FOO -D BAR
22

33
class A {}
44

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
1-
// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9
1+
// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 -parse-stdlib
2+
3+
struct Foo {}
24

35
#if FOO
4-
var a = 0
6+
var a = Foo()
57
#endif
68
var b = a
79

810
#if !BAR
9-
var c = 0
11+
var c = Foo()
1012
#endif
1113
var d = c
1214

1315
#if FOO || BAR
14-
var e = 0
16+
var e = Foo()
1517
#endif
1618
var f = e
1719

1820
#if BAR || FOO
19-
var g = 0
21+
var g = Foo()
2022
#endif
2123
var h = g
2224

2325
#if FOO && BAZ
24-
var i = 0
26+
var i = Foo()
2527
#endif
2628
var j = i
2729

2830
#if os(OSX)
29-
var k = 0
31+
var k = Foo()
3032
#endif
3133
var l = k
3234

3335
#if arch(x86_64)
34-
var m = 0
36+
var m = Foo()
3537
#endif
3638
var n = m
3739

3840
#if FOO && !BAR && BAZ && os(OSX) && arch(x86_64) && _runtime(_ObjC)
39-
var o = 0
41+
var o = Foo()
4042
#endif
4143
var p = o
4244

4345
#if FOO && (!BAR && BAZ && os(OSX) && arch(x86_64)) && _runtime(_ObjC)
44-
var q = 0
46+
var q = Foo()
4547
#endif
4648
var r = q
4749

4850
#if FOO && !(!BAZ && BAZ && os(OSX) && arch(x86_64)) && _runtime(_ObjC)
49-
var s = 0
51+
var s = Foo()
5052
#endif
5153
var t = s

test/BuildConfigurations/basicParseErrors.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9
1+
// RUN: %target-parse-verify-swift -D FOO -D BAZ
22

33
#if FOO == BAZ // expected-error{{expected '&&' or '||' expression}}
44
var x = 0

test/BuildConfigurations/decl_parse_errors.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse -verify %s
1+
// RUN: %target-parse-verify-swift
22

33
class C {
44

test/BuildConfigurations/module_top_level.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify -parse-as-library
1+
// RUN: %target-parse-verify-swift -parse-as-library
22

33
#if FAIL
44
class C {}

test/BuildConfigurations/no_configuration_error1.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify
1+
// RUN: %target-parse-verify-swift
22

33
// With a space next to the '#if'
44
#if // expected-error {{expected a build configuration expression to follow the #if clause}}

test/BuildConfigurations/no_configuration_error2.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify
1+
// RUN: %target-parse-verify-swift
22

33
// No space next to the '#if'
44

test/BuildConfigurations/pound-if-inside-function-2.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -D BLAH %s -verify -parse
1+
// RUN: %target-parse-verify-swift -D BLAH
22

33
// Check that if config statement has range properly nested in its parent
44
// EOF.

test/BuildConfigurations/pound-if-inside-function-3.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -D BLAH %s -verify -parse
1+
// RUN: %target-parse-verify-swift -D BLAH
22

33
// Check that if config statement has range properly nested in its parent
44
// EOF.

test/BuildConfigurations/pound-if-inside-function-4.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -D BLAH %s -verify -parse
1+
// RUN: %target-parse-verify-swift -D BLAH
22

33
// Check that if config statement has range properly nested in its parent
44
// EOF.

test/BuildConfigurations/pound-if-inside-function.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %s -verify -parse
1+
// RUN: %target-parse-verify-swift
22

33
// Check that if config statement has range properly nested in its parent
44
// EOF.

test/BuildConfigurations/pound-if-inside-statement-2.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -D BLAH %s -verify -parse
1+
// RUN: %target-parse-verify-swift -D BLAH
22

33
func foo() { // expected-note {{to match this opening '{'}}
44
if true {

test/BuildConfigurations/pound-if-inside-statement.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %s -verify -parse
1+
// RUN: %target-parse-verify-swift
22

33
func foo() { // expected-note {{to match this opening '{'}}
44
if true {

test/BuildConfigurations/pound-if-top-level-clean.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -D FOO %s -verify -parse
1+
// RUN: %target-parse-verify-swift -D FOO
22

33
var x = 0
44

test/BuildConfigurations/pound-if-top-level.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -D BLAH %s -verify -parse
1+
// RUN: %target-parse-verify-swift -D BLAH
22

33
// Check that if config statement has range properly nested in its parent
44
// EOF.

test/BuildConfigurations/topLevelDeclarations.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse %s -verify -D FOO
1+
// RUN: %target-parse-verify-swift -D FOO
22

33
// This test is meant to ensure that mixes of top-level declarations, statements
44
// and expressions within #if blocks parse correctly
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9
1+
// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 -parse-stdlib
2+
3+
struct Foo {}
4+
5+
func useFoo(foo: Foo) {}
26

37
#if arch(x86_64) && os(OSX)
4-
println("Mac") // This should not be parsed as a trailing closure
8+
useFoo(Foo()) // This should not be parsed as a trailing closure
59
#endif

test/ClangModules/CoreServices_test.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -parse %s -verify
1+
// RUN: %target-parse-verify-swift %clang-importer-sdk
22

33
import CoreServices
44

test/ClangModules/Darwin_test.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -parse %s -verify
1+
// RUN: %target-parse-verify-swift %clang-importer-sdk
22

33
import Darwin
44

test/ClangModules/MixedSource/broken-modules.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// RUN: rm -rf %t && mkdir -p %t
2-
// RUN: not %swift -parse %s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt
2+
// RUN: not %target-swift-frontend -parse %s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt
33
// RUN: FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s < %t/err.txt
44

5-
// RUN: not %swift -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import 2> %t/err.bridging-header.txt
5+
// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import 2> %t/err.bridging-header.txt
66
// RUN: FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s < %t/err.bridging-header.txt
77

8-
// RUN: not %swift -parse %s -import-objc-header %t/fake.h 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s
8+
// RUN: not %target-swift-frontend -parse %s -import-objc-header %t/fake.h 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s
99

10-
// RUN: not %swift -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s
10+
// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s
1111

1212
// MISSING-HEADER: error: bridging header '{{.*}}/fake.h' does not exist
1313
// MISSING-HEADER-NOT: error

test/ClangModules/MixedSource/import-mixed-framework.swift

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
// RUN: cp -r %S/Inputs/mixed-framework/Mixed.framework %t
44

55
// Don't crash if a generated header is present but the swiftmodule is missing.
6-
// RUN: not %swift %clang-importer-sdk -F %t -parse %s
6+
// RUN: not %target-swift-frontend %clang-importer-sdk -F %t -parse %s
77

8-
// RUN: %swiftc_driver -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/x86_64.swiftmodule %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -Xfrontend -disable-objc-attr-requires-foundation-module
9-
// RUN: %swift %clang-importer-sdk -F %t -parse %s -verify
10-
11-
// REQUIRES: X86
8+
// RUN: %target-swift-frontend -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/%target-swiftmodule-name %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -disable-objc-attr-requires-foundation-module
9+
// RUN: %target-swift-frontend %clang-importer-sdk -F %t -parse %s -verify
1210

1311
import Mixed
1412

test/ClangModules/MixedSource/import-mixed-with-header-twice.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

4-
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader
5-
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header-again.h -emit-module-path %t/MixedWithHeaderAgain.swiftmodule %S/Inputs/mixed-with-header-again.swift %S/../../Inputs/empty.swift -module-name MixedWithHeaderAgain
6-
// RUN: %swift %clang-importer-sdk -I %S/../Inputs/custom-modules -I %t -parse %s -verify
4+
// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader
5+
// RUN: %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header-again.h -emit-module-path %t/MixedWithHeaderAgain.swiftmodule %S/Inputs/mixed-with-header-again.swift %S/../../Inputs/empty.swift -module-name MixedWithHeaderAgain
6+
// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -I %t -parse %s -verify
77

88
// RUN: rm %t/mixed-target/header.h
9-
// RUN: not %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER
9+
// RUN: not %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER
1010

1111
// USE-SERIALIZED-HEADER: redefinition of 'Point2D'
1212
// USE-SERIALIZED-HEADER: previous definition is here

test/ClangModules/MixedSource/import-mixed-with-header.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

4-
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader
5-
// RUN: %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify
4+
// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader
5+
// RUN: %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify
66

77
// RUN: rm -rf %t/mixed-target/
8-
// RUN: %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify
8+
// RUN: %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify
99

1010
import MixedWithHeader
1111

test/ClangModules/MixedSource/mixed-nsuinteger.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -I %S/Inputs/user-module -parse -target x86_64-apple-darwin13 %s -verify
1+
// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/user-module -parse %s -verify
22

33
// Type checker should not report any errors in the code below.
44

test/ClangModules/MixedSource/mixed-target-using-header.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -I %S/../Inputs/custom-modules -import-objc-header %S/Inputs/mixed-target/header.h -parse %s -verify
1+
// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %S/Inputs/mixed-target/header.h -parse %s -verify
22

33
func test(foo : FooProto) {
44
let _: CInt = foo.bar

test/ClangModules/MixedSource/mixed-target-using-module.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify
2-
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s
3-
// RUN: not %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s
1+
// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify
2+
// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s
3+
// RUN: not %target-swift-frontend %clang-importer-sdk -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s
44

55
// CHECK-AUTOLINK: !{{[0-9]+}} = !{i32 {{[0-9]+}}, !"Linker Options", ![[LINK_LIST:[0-9]+]]}
66
// CHECK-AUTOLINK: ![[LINK_LIST]] = !{

test/ClangModules/MixedSource/resolve-cross-language.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: rm -rf %t
22
// RUN: mkdir -p %t
33

4-
// RUN: %swiftc_driver -emit-module -emit-objc-header -o %t/Base.swiftmodule %S/Inputs/resolve-cross-language/Base.swift -Xfrontend -disable-objc-attr-requires-foundation-module
4+
// RUN: %target-swift-frontend -emit-module -emit-objc-header -o %t/Base.swiftmodule %S/Inputs/resolve-cross-language/Base.swift -disable-objc-attr-requires-foundation-module
55
// RUN: cp %S/Inputs/resolve-cross-language/Base-module.map %t/module.map
6-
// RUN: %swift %clang-importer-sdk -parse -I %t -F %S/Inputs/resolve-cross-language %s -verify
6+
// RUN: %target-swift-frontend %clang-importer-sdk -parse -I %t -F %S/Inputs/resolve-cross-language %s -verify
77

88
import Base
99
import BaseUser

test/ClangModules/Security_test.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -parse %s -verify
1+
// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify
22

33
import Security
44

test/ClangModules/accessibility_framework.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s
1+
// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s
2+
3+
// REQUIRES: OS=macosx
24

35
// The accessibility APIs are handled differently. A class might conform to both
46
// NSAccessibility (containing accessibility properties) and individual

test/ClangModules/adapter.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift -parse -verify %clang-importer-sdk -I %S/Inputs/custom-modules %s
1+
// RUN: %target-swift-frontend -parse -verify %clang-importer-sdk -I %S/Inputs/custom-modules %s
22

33
// Do not import Foundation! This tests indirect visibility.
44
import Redeclaration

test/ClangModules/autolinking.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: rm -rf %t
22
// RUN: mkdir -p %t
3-
// RUN: %swift %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll
3+
// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll
44
// RUN: FileCheck %s < %t/without-adapter.ll
55

6-
// RUN: %swift -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -module-link-name SwiftAdapter -module-name ClangModuleWithAdapter -I=%S/Inputs/custom-modules -o %t
7-
// RUN: %swift %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -emit-ir -o %t/with-adapter.ll
6+
// RUN: %target-swift-frontend -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -module-link-name SwiftAdapter -module-name ClangModuleWithAdapter -I %S/Inputs/custom-modules -o %t
7+
// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -emit-ir -o %t/with-adapter.ll
88
// RUN: FileCheck %s < %t/with-adapter.ll
99
// RUN: FileCheck --check-prefix=CHECK-WITH-SWIFT %s < %t/with-adapter.ll
1010

test/ClangModules/availability.swift

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s
1+
// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules %s
22

33
import Dispatch
44
import Foundation
@@ -36,10 +36,6 @@ func test_class_avail(x:NSObject, obj: AnyObject) {
3636
obj.`class`!() // expected-error {{'class()' is unavailable: use 'dynamicType' instead}}
3737
}
3838

39-
func test_unavailable_because_deprecated() {
40-
println(NSRealMemoryAvailable()) // expected-error {{'NSRealMemoryAvailable()' is unavailable: APIs deprecated as of OS X 10.9 and earlier are unavailable in Swift}}
41-
}
42-
4339
func test_unavailable_app_extension() {
4440
// No expected error here. See corresponding App extension test.
4541
println(SomeCrazyAppExtensionForbiddenAPI()) // no-error

test/ClangModules/availability_app_extension.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 -application-extension %s
1+
// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -application-extension %s
22

33
import Foundation
44

test/ClangModules/availability_ios.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -parse -verify %s
1+
// RUN: %target-parse-verify-swift
22
// REQUIRES: OS=ios
33

44
import Foundation
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: %target-parse-verify-swift
2+
3+
// REQUIRES: OS=macosx
4+
5+
import Foundation
6+
7+
func test_unavailable_because_deprecated() {
8+
println(NSRealMemoryAvailable()) // expected-error {{APIs deprecated as of OS X 10.9 and earlier are unavailable in Swift}}
9+
}
10+

test/ClangModules/blocks_parse.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s
1+
// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s
22

33
import blocks
44
import Foundation

test/ClangModules/broken-modules.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: rm -rf %t && mkdir -p %t
2-
// RUN: not %swift -parse %s -I %S/Inputs/custom-modules/ -show-diagnostics-after-fatal 2> %t/err.txt
2+
// RUN: not %target-swift-frontend -parse %s -I %S/Inputs/custom-modules/ -show-diagnostics-after-fatal 2> %t/err.txt
33
// RUN: FileCheck %s < %t/err.txt
44

55
import MissingHeader

0 commit comments

Comments
 (0)