|
| 1 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASSNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 2 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCTNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 3 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUMNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 4 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTOCOLNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 5 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PRECEDENCEGROUPNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 6 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPERATORNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 7 | + |
| 8 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-keywords=false -code-completion-token=METHODNAME | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 9 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-keywords=false -code-completion-token=METHODNAME_OVERRIDE | %FileCheck %s --check-prefix=METHODNAME_OVERRIDE |
| 10 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-keywords=false -code-completion-token=METHODNAME_PROTOCOL | %FileCheck %s --check-prefix=NO_COMPLETIONS |
| 11 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-keywords=false -code-completion-token=METHODNAME_CONFORMANCE | %FileCheck %s --check-prefix=METHODNAME_CONFORMANCE |
| 12 | + |
| 13 | +// NO_COMPLETIONS-NOT: Begin completions |
| 14 | + |
| 15 | +class #^CLASSNAME^# {} |
| 16 | +struct #^STRUCTNAME^# |
| 17 | +enum #^ENUMNAME^# |
| 18 | +protocol #^PROTOCOLNAME^# {} |
| 19 | +precedencegroup #^PRECEDENCEGROUPNAME^# |
| 20 | +infix operator #^OPERATORNAME^# |
| 21 | + |
| 22 | +class MyCls { |
| 23 | + func foo() {} |
| 24 | + func #^METHODNAME^# |
| 25 | +} |
| 26 | + |
| 27 | +class MySub : MyCls { |
| 28 | + func #^METHODNAME_OVERRIDE^# |
| 29 | +// METHODNAME_OVERRIDE: Begin completions, 1 items |
| 30 | +// METHODNAME_OVERRIDE-NEXT: Decl[InstanceMethod]/Super: foo() {|}; name=foo() |
| 31 | +// METHODNAME_OVERRIDE-NEXT: End completions |
| 32 | +} |
| 33 | + |
| 34 | +protocol P { |
| 35 | + func foo() {} |
| 36 | + func #^METHODNAME_PROTOCOL^# |
| 37 | +} |
| 38 | + |
| 39 | +struct MyStruct : P { |
| 40 | + func #^METHODNAME_CONFORMANCE^# |
| 41 | +// METHODNAME_CONFORMANCE: Begin completions, 1 items |
| 42 | +// METHODNAME_CONFORMANCE-NEXT: Decl[InstanceMethod]/Super: foo() {|}; name=foo() |
| 43 | +// METHODNAME_CONFORMANCE-NEXT: End completions |
| 44 | +} |
0 commit comments