|
78 | 78 | // RUN: %FileCheck %s -check-prefix=CLASS_PEI_PE < %t.txt
|
79 | 79 | // RUN: %FileCheck %s -check-prefix=WITH_PEI < %t.txt
|
80 | 80 |
|
| 81 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTOCOL_PA -code-completion-keywords=false > %t.txt |
| 82 | +// RUN: %FileCheck %s -check-prefix=PROTOCOL_PA < %t.txt |
| 83 | + |
| 84 | +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTOCOL_PA_EXT -code-completion-keywords=false > %t.txt |
| 85 | +// RUN: %FileCheck %s -check-prefix=PROTOCOL_PA_EXT < %t.txt |
| 86 | + |
81 | 87 | // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL -code-completion-keywords=false > %t.txt
|
82 | 88 | // RUN: %FileCheck %s -check-prefix=NESTED_NOMINAL < %t.txt
|
83 | 89 |
|
@@ -362,6 +368,24 @@ class TestClass_PEI_PE : ProtocolEImpl, ProtocolE {
|
362 | 368 | }
|
363 | 369 | // CLASS_PEI_PE: Begin completions, 4 items
|
364 | 370 |
|
| 371 | +protocol TestProtocol_PA : ProtocolA { |
| 372 | + #^PROTOCOL_PA^# |
| 373 | +} |
| 374 | +// PROTOCOL_PA: found code completion token |
| 375 | +// PROTOCOL_PA-NOT: Begin completions |
| 376 | + |
| 377 | +extension TestProtocol_PA { |
| 378 | + #^PROTOCOL_PA_EXT^# |
| 379 | +} |
| 380 | + |
| 381 | +// PROTOCOL_PA_EXT: Begin completions |
| 382 | +// PROTOCOL_PA_EXT-DAG: Decl[Constructor]/Super: init(fromProtocolA: Int) {|}; name=init(fromProtocolA: Int) |
| 383 | +// PROTOCOL_PA_EXT-DAG: Decl[InstanceMethod]/Super: func protoAFunc() {|}; name=protoAFunc() |
| 384 | +// PROTOCOL_PA_EXT-DAG: Decl[InstanceMethod]/Super: func protoAFuncOptional() {|}; name=protoAFuncOptional() |
| 385 | +// PROTOCOL_PA_EXT-DAG: Decl[InstanceVar]/Super: var protoAVarRW: Int; name=protoAVarRW: Int |
| 386 | +// PROTOCOL_PA_EXT-DAG: Decl[InstanceVar]/Super: var protoAVarRO: Int; name=protoAVarRO: Int |
| 387 | +// PROTOCOL_PA_EXT: End completions |
| 388 | + |
365 | 389 | class OuterNominal : ProtocolA {
|
366 | 390 | class Inner {
|
367 | 391 | #^NESTED_NOMINAL^#
|
|
0 commit comments