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.
8 \brief This is ReadonlyProperty
10 @property (readonly, getter = ReadonlyGetter) id MyProperty;
13 \brief This is GeneralProperty
15 @property int GeneralProperty;
18 \brief This is PropertyInPrimaryClass
20 @property (copy, nonatomic) id PropertyInPrimaryClass;
22 - (void) setThisRecord : (id)arg;
27 @interface AppDelegate()
28 - (id) GetterInClassExtension;
32 @property (copy, setter = setThisRecord:) id Record;
35 @interface AppDelegate()
37 \brief This is PropertyInClassExtension
39 @property (copy, getter = GetterInClassExtension) id PropertyInClassExtension;
41 - (id) PropertyInPrimaryClass;
44 @implementation AppDelegate
45 - (id) PropertyInPrimaryClass {
46 id p = [self ReadonlyGetter];
47 p = [self GetterInClassExtension];
48 p = [self PropertyInPrimaryClass];
50 [self setThisRecord : (id)0 ];
51 p = self.GetterInClassExtension;
55 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:46:16 %s | FileCheck -check-prefix=CHECK-CC1 %s
56 // CHECK-CC1: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is ReadonlyProperty)
58 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:47:13 %s | FileCheck -check-prefix=CHECK-CC2 %s
59 // CHECK-CC2: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension)
61 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:48:13 %s | FileCheck -check-prefix=CHECK-CC3 %s
62 // CHECK-CC3: {TypedText PropertyInPrimaryClass}{{.*}}(brief comment: This is PropertyInPrimaryClass)
64 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:49:13 %s | FileCheck -check-prefix=CHECK-CC4 %s
65 // CHECK-CC4: {TypedText Record}{{.*}}(brief comment: This is Record)
67 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:50:9 %s | FileCheck -check-prefix=CHECK-CC5 %s
68 // CHECK-CC5: {TypedText setThisRecord:}{Placeholder (id)}{{.*}}(brief comment: This is Record)
70 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:51:12 %s | FileCheck -check-prefix=CHECK-CC6 %s
71 // CHECK-CC6: {TypedText GetterInClassExtension}{{.*}}(brief comment: This is PropertyInClassExtension)
73 @interface AnotherAppDelegate
75 \brief This is ReadonlyProperty
77 @property (getter = ReadonlyGetter) int MyProperty;
79 \brief This is getter = ReadonlyGetter
81 - (int) ReadonlyGetter;
84 @implementation AnotherAppDelegate
85 - (int) PropertyInPrimaryClass {
89 // RUN: env CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 c-index-test -code-completion-at=%s:86:6 %s | FileCheck -check-prefix=CHECK-CC7 %s
90 // CHECK-CC7: {TypedText ReadonlyGetter}{{.*}}(brief comment: This is getter = ReadonlyGetter)