Douglas Gregor | 322328b | 2009-11-18 22:32:06 +0000 | [diff] [blame] | 1 | /* Note: the RUN lines are near the end of the file, since line/column |
| 2 | matter for this test. */ |
| 3 | |
| 4 | @interface I1 |
| 5 | { |
| 6 | id StoredProp3; |
| 7 | int RandomIVar; |
| 8 | } |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 9 | @property int Prop0; |
Douglas Gregor | 322328b | 2009-11-18 22:32:06 +0000 | [diff] [blame] | 10 | @property int Prop1; |
| 11 | @property float Prop2; |
| 12 | @end |
| 13 | |
| 14 | @interface I2 : I1 |
| 15 | @property id Prop3; |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 16 | @property id Prop4; |
Douglas Gregor | 322328b | 2009-11-18 22:32:06 +0000 | [diff] [blame] | 17 | @end |
| 18 | |
| 19 | @implementation I2 |
| 20 | @synthesize Prop2, Prop1, Prop3 = StoredProp3; |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 21 | @dynamic Prop4; |
Douglas Gregor | 322328b | 2009-11-18 22:32:06 +0000 | [diff] [blame] | 22 | @end |
| 23 | |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 24 | // RUN: c-index-test -code-completion-at=%s:20:13 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 25 | // CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} |
| 26 | // CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop1} |
| 27 | // CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText Prop2} |
| 28 | // CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop3} |
| 29 | // CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 30 | // RUN: c-index-test -code-completion-at=%s:20:20 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 31 | // CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} |
| 32 | // CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop1} |
| 33 | // CHECK-CC2-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop3} |
| 34 | // CHECK-CC2: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 35 | // RUN: c-index-test -code-completion-at=%s:20:35 %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 36 | // CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText RandomIVar} |
| 37 | // CHECK-CC3: ObjCIvarDecl:{ResultType id}{TypedText StoredProp3} |
Douglas Gregor | 424b2a5 | 2009-11-18 22:56:13 +0000 | [diff] [blame] | 38 | // RUN: c-index-test -code-completion-at=%s:21:10 %s | FileCheck -check-prefix=CHECK-CC4 %s |
Douglas Gregor | ff5ce6e | 2009-12-18 18:53:37 +0000 | [diff] [blame] | 39 | // CHECK-CC4: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} |
| 40 | // CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} |