Douglas Gregor | 9630eb6 | 2009-11-17 16:44:22 +0000 | [diff] [blame^] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
| 3 | |
| 4 | @protocol FooTestProtocol |
| 5 | + protocolClassMethod; |
| 6 | - protocolInstanceMethod : (int)value; |
| 7 | @end |
| 8 | @interface Foo <FooTestProtocol> { |
| 9 | void *isa; |
| 10 | } |
| 11 | + (int)classMethod1:a withKeyword:(int)b; |
| 12 | + (void)classMethod2; |
| 13 | + new; |
| 14 | - instanceMethod1; |
| 15 | @end |
| 16 | |
| 17 | @interface Foo (FooTestCategory) |
| 18 | + categoryClassMethod; |
| 19 | - categoryInstanceMethod; |
| 20 | @end |
| 21 | |
| 22 | void func() { |
| 23 | Foo *obj = [Foo new]; |
| 24 | [obj xx]; |
| 25 | } |
| 26 | // RUN: c-index-test -code-completion-at=%s:23:19 %s | FileCheck -check-prefix=CHECK-CC1 %s |
| 27 | // CHECK-CC1: {TypedText categoryClassMethod} |
| 28 | // CHECK-CC1: {TypedText classMethod2} |
| 29 | // CHECK-CC1: {TypedText new} |
| 30 | // CHECK-CC1: {TypedText protocolClassMethod} |
| 31 | // CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)a}{Text withKeyword:}{Placeholder (int)b} |
| 32 | // RUN: c-index-test -code-completion-at=%s:24:8 %s | FileCheck -check-prefix=CHECK-CC2 %s |
| 33 | // CHECK-CC2: {TypedText categoryInstanceMethod} |
| 34 | // CHECK-CC2: {TypedText instanceMethod1} |
| 35 | // CHECK-CC2: {TypedText protocolInstanceMethod:}{Placeholder (int)value} |