mirror of
https://github.com/apple/swift.git
synced 2025-12-25 12:15:36 +01:00
The code goes into its own sub-tree under 'tools' but tests go under 'test', so that running 'check-swift' will also run all the SourceKit tests. SourceKit is disabled on non-darwin platforms.
18 lines
395 B
Swift
18 lines
395 B
Swift
// RUN: %complete-test -raw -tok=INIT_NAME %s | FileCheck %s -check-prefix=INIT_NAME
|
|
// RUN: %complete-test -raw -tok=METHOD_NAME %s | FileCheck %s -check-prefix=METHOD_NAME
|
|
|
|
struct S {
|
|
init(a: Int, b: Int) {}
|
|
func foo(a: Int, b: Int) {}
|
|
}
|
|
|
|
func test01() {
|
|
S(#^INIT_NAME^#)
|
|
}
|
|
// INIT_NAME: key.name: "a:b:)"
|
|
|
|
func test02(x: S) {
|
|
x.#^METHOD_NAME^#
|
|
}
|
|
// METHOD_NAME: key.name: "foo(a:b:)"
|