blob: f4424ced081296f762bea52e204c7913746ea237 [file] [log] [blame]
Douglas Gregora4494d82009-11-19 07:58:03 +00001// 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 Gregorff5ce6e2009-12-18 18:53:37 +000023// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1}
Douglas Gregora4494d82009-11-19 07:58:03 +000024// CHECK-CC1-NOT: getter2
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000025// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3}
Douglas Gregora4494d82009-11-19 07:58:03 +000026// RUN: c-index-test -code-completion-at=%s:13:39 %s | FileCheck -check-prefix=CHECK-CC2 %s
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000027// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:}
28// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:}
Douglas Gregora4494d82009-11-19 07:58:03 +000029// CHECK-CC2-NOT: setter2
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000030// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:}
Douglas Gregora4494d82009-11-19 07:58:03 +000031// RUN: c-index-test -code-completion-at=%s:19:21 %s | FileCheck -check-prefix=CHECK-CC3 %s
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000032// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1}
Douglas Gregora4494d82009-11-19 07:58:03 +000033// CHECK-CC3-NOT: getter2
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000034// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3}
35// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter4}
Douglas Gregora4494d82009-11-19 07:58:03 +000036// RUN: c-index-test -code-completion-at=%s:19:39 %s | FileCheck -check-prefix=CHECK-CC4 %s
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000037// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:}{Informative (int)x}
38// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:}{Informative (int)x}
Douglas Gregora4494d82009-11-19 07:58:03 +000039// CHECK-CC4-NOT: setter2
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000040// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:}{Informative (int)y}
41// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter4:}{Informative (int)x}