1 // Note: the run lines follow their respective tests, since line/column numbers
2 // matter in this test.
3 // This test is for when property accessors do not have their own code
4 // completion comments. Use those in their properties in this case.
9 \brief This is ReadonlyProperty
11 @property (readonly, getter = ReadonlyGetter) id MyProperty;
14 \brief This is GeneralProperty
16 @property int GeneralProperty;
19 \brief This is PropertyInPrimaryClass
21 @property (copy, nonatomic) id PropertyInPrimaryClass;
23 - (void) setThisRecord : (id)arg;
28 @interface AppDelegate()
29 - (id) GetterInClassExtension;
33 @property (copy, setter = setThisRecord:) id Record;
36 @interface AppDelegate()
38 \brief This is PropertyInClassExtension
40 @property (copy, getter = GetterInClassExtension) id PropertyInClassExtension;
42 - (id) PropertyInPrimaryClass;
45 @implementation AppDelegate
46 - (id) PropertyInPrimaryClass {
47 id p = [self ReadonlyGetter];
48 p = [self GetterInClassExtension];
49 p = [self PropertyInPrimaryClass];
51 [self setThisRecord : (id)0 ];
52 p = self.GetterInClassExtension;
56 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:47:16 %s | FileCheck -check-prefix=CHECK-CC1 %s
57 // CHECK-CC1: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is ReadonlyProperty)
59 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:48:13 %s | FileCheck -check-prefix=CHECK-CC2 %s
60 // CHECK-CC2: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension)
62 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:49:13 %s | FileCheck -check-prefix=CHECK-CC3 %s
63 // CHECK-CC3: {TypedText PropertyInPrimaryClass}{{.*}}(brief comment: This is PropertyInPrimaryClass)
65 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:50:13 %s | FileCheck -check-prefix=CHECK-CC4 %s
66 // CHECK-CC4: {TypedText Record}{{.*}}(brief comment: This is Record)
68 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:51:9 %s | FileCheck -check-prefix=CHECK-CC5 %s
69 // CHECK-CC5: {TypedText setThisRecord:}{Placeholder (id)}{{.*}}(brief comment: This is Record)
71 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:52:12 %s | FileCheck -check-prefix=CHECK-CC6 %s
72 // CHECK-CC6: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension)
74 @interface AnotherAppDelegate
76 \brief This is ReadonlyProperty
78 @property (getter = ReadonlyGetter) int MyProperty;
80 \brief This is getter = ReadonlyGetter
82 - (int) ReadonlyGetter;
85 @implementation AnotherAppDelegate
86 - (int) PropertyInPrimaryClass {
90 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:87:6 %s | FileCheck -check-prefix=CHECK-CC7 %s
91 // CHECK-CC7: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is getter = ReadonlyGetter)