Files
swift-mirror/test/SourceKit/CodeComplete/complete_name.swift
Argyrios Kyrtzidis 8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
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.
2015-11-05 01:09:08 -08:00

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:)"