Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
| 3 | |
| 4 | @interface Super { } |
| 5 | - (int)getter1; |
| 6 | + (int)getter2_not_instance; |
| 7 | - (int)getter2_not:(int)x; |
| 8 | - (int)getter3; |
| 9 | - (void)setter1:(int)x; |
| 10 | + (void)setter2_not_inst:(int)x; |
| 11 | + (void)setter2_many_args:(int)x second:(int)y; |
| 12 | - (void)setter3:(int)y; |
| 13 | @property (getter = getter1, setter = setter1:) int blah; |
| 14 | @end |
| 15 | |
| 16 | @interface Sub : Super { } |
| 17 | - (int)getter4; |
| 18 | - (void)setter4:(int)x; |
| 19 | @property (getter = getter4, setter = setter1:) int blarg; |
| 20 | @end |
| 21 | |
| 22 | // RUN: c-index-test -code-completion-at=%s:13:21 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 23 | // CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 24 | // CHECK-CC1-NOT: getter2 |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 25 | // CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 26 | // RUN: c-index-test -code-completion-at=%s:13:39 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 27 | // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:} |
| 28 | // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 29 | // CHECK-CC2-NOT: setter2 |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 30 | // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 31 | // RUN: c-index-test -code-completion-at=%s:19:21 %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 32 | // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 33 | // CHECK-CC3-NOT: getter2 |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 34 | // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3} |
| 35 | // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter4} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 36 | // RUN: c-index-test -code-completion-at=%s:19:39 %s | FileCheck -check-prefix=CHECK-CC4 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 37 | // CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:}{Informative (int)x} |
| 38 | // CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:}{Informative (int)x} |
Douglas Gregor | a4494d8 | 2009-11-19 07:58:03 +0000 | [diff] [blame] | 39 | // CHECK-CC4-NOT: setter2 |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 40 | // CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:}{Informative (int)y} |
| 41 | // CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter4:}{Informative (int)x} |