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
36 lines
1.1 KiB
Swift
36 lines
1.1 KiB
Swift
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT
|
|
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BAR_OBJECT_DOT_1 | FileCheck %s -check-prefix=BAR_OBJECT_DOT
|
|
|
|
protocol FooBaseProtocol {
|
|
var instanceProperty: Int { get }
|
|
}
|
|
|
|
protocol FooRefinedProtocol : FooBaseProtocol {}
|
|
|
|
protocol FooMoreRefinedProtocol : FooRefinedProtocol {}
|
|
|
|
protocol FooEvenMoreRefinedProtocol : FooRefinedProtocol {}
|
|
|
|
struct FooStruct : FooMoreRefinedProtocol {
|
|
var instanceProperty: Int { return 0 }
|
|
}
|
|
// FOO_OBJECT_DOT: Begin completions
|
|
// FOO_OBJECT_DOT-NEXT: Decl[InstanceVar]/CurrNominal: instanceProperty[#Int#]
|
|
// FOO_OBJECT_DOT-NEXT: End completions
|
|
|
|
struct BarStruct : FooEvenMoreRefinedProtocol {
|
|
var instanceProperty: Int { return 0 }
|
|
}
|
|
// BAR_OBJECT_DOT: Begin completions
|
|
// BAR_OBJECT_DOT-NEXT: Decl[InstanceVar]/CurrNominal: instanceProperty[#Int#]
|
|
// BAR_OBJECT_DOT-NEXT: End completions
|
|
|
|
func test(a: FooStruct) {
|
|
a.#^FOO_OBJECT_DOT_1^#
|
|
}
|
|
|
|
func test(a: BarStruct) {
|
|
a.#^BAR_OBJECT_DOT_1^#
|
|
}
|
|
|