complete-documentation-properties.m revision b98f7af5685458a00d4efd60429378efe88ad10f
1// Note: the run lines follow their respective tests, since line/column numbers 2// matter in this test. 3// rdar://12791315 4 5@interface AppDelegate 6/** 7 \brief This is ReadonlyProperty 8*/ 9@property (readonly, getter = ReadonlyGetter) id MyProperty; 10 11/** 12 \brief This is GeneralProperty 13*/ 14@property int GeneralProperty; 15 16/** 17 \brief This is PropertyInPrimaryClass 18*/ 19@property (copy, nonatomic) id PropertyInPrimaryClass; 20 21- (void) setThisRecord : (id)arg; 22- (id) Record; 23@end 24 25 26@interface AppDelegate() 27- (id) GetterInClassExtension; 28/** 29 \brief This is Record 30*/ 31@property (copy, setter = setThisRecord:) id Record; 32@end 33 34@interface AppDelegate() 35/** 36 \brief This is PropertyInClassExtension 37*/ 38@property (copy, getter = GetterInClassExtension) id PropertyInClassExtension; 39 40- (id) PropertyInPrimaryClass; 41@end 42 43@implementation AppDelegate 44- (id) PropertyInPrimaryClass { 45 id p = [self ReadonlyGetter]; 46 p = [self GetterInClassExtension]; 47 p = [self PropertyInPrimaryClass]; 48 p = [self Record]; 49 [self setThisRecord : (id)0 ]; 50 return 0; 51} 52@end 53// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:45:16 %s | FileCheck -check-prefix=CC1 %s 54// CHECK-CC1: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is ReadonlyProperty) 55 56// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:46:13 %s | FileCheck -check-prefix=CC2 %s 57// CHECK-CC2: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension) 58 59// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:47:13 %s | FileCheck -check-prefix=CC3 %s 60// CHECK-CC3: {TypedText PropertyInPrimaryClass}{{.*}}(brief comment: This is PropertyInPrimaryClass) 61 62// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:48:13 %s | FileCheck -check-prefix=CC4 %s 63// CHECK-CC4: {TypedText Record}{{.*}}(brief comment: This is Record) 64 65// RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:49:9 %s | FileCheck -check-prefix=CC5 %s 66// CHECK-CC5: {TypedText setThisRecord:}{Placeholder (id)}{{.*}}(brief comment: This is Record) 67