Fariborz Jahanian | c328d9c | 2013-01-12 00:28:34 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir %t |
| 3 | // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out |
| 4 | // RUN: FileCheck %s < %t/out |
| 5 | // rdar://12378879 |
| 6 | |
| 7 | // Ensure that XML we generate is not invalid. |
| 8 | // RUN: FileCheck %s -check-prefix=WRONG < %t/out |
| 9 | // WRONG-NOT: CommentXMLInvalid |
| 10 | |
| 11 | @interface AppDelegate |
| 12 | /** |
| 13 | \brief This is ReadonlyProperty |
| 14 | */ |
| 15 | @property (readonly, getter = ReadonlyGetter) int MyProperty; |
| 16 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-1]]" column="51"><Name>MyProperty</Name><USR>c:objc(cs)AppDelegate(py)MyProperty</USR><Declaration>- (int)ReadonlyGetter;</Declaration><Abstract><Para> This is ReadonlyProperty</Para></Abstract></Function>] |
| 17 | |
| 18 | /** |
| 19 | \brief This is GeneralProperty |
| 20 | */ |
| 21 | @property int GeneralProperty; |
| 22 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-1]]" column="15"><Name>GeneralProperty</Name><USR>c:objc(cs)AppDelegate(py)GeneralProperty</USR><Declaration>- (int)GeneralProperty;</Declaration><Abstract><Para> This is GeneralProperty</Para></Abstract></Function>] |
| 23 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-2]]" column="15"><Name>GeneralProperty</Name><USR>c:objc(cs)AppDelegate(py)GeneralProperty</USR><Declaration>- (void)setGeneralProperty:(int)GeneralProperty;</Declaration><Abstract><Para> This is GeneralProperty</Para></Abstract></Function>] |
| 24 | |
| 25 | /** |
| 26 | \brief This is PropertyInPrimaryClass |
| 27 | */ |
| 28 | @property (copy, nonatomic) id PropertyInPrimaryClass; |
| 29 | - (void) setThisRecord : (id)arg; |
| 30 | - (id) Record; |
| 31 | @end |
| 32 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-4]]" column="32"><Name>PropertyInPrimaryClass</Name><USR>c:objc(cs)AppDelegate(py)PropertyInPrimaryClass</USR><Declaration>- (id)PropertyInPrimaryClass;</Declaration><Abstract><Para> This is PropertyInPrimaryClass</Para></Abstract></Function>] |
| 33 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-5]]" column="32"><Name>PropertyInPrimaryClass</Name><USR>c:objc(cs)AppDelegate(py)PropertyInPrimaryClass</USR><Declaration>- (void)setPropertyInPrimaryClass:(id)PropertyInPrimaryClass;</Declaration><Abstract><Para> This is PropertyInPrimaryClass</Para></Abstract></Function>] |
| 34 | |
| 35 | @interface AppDelegate() |
| 36 | - (id) GetterInClassExtension; |
| 37 | /** |
| 38 | \brief This is Record |
| 39 | */ |
| 40 | @property (copy, setter = setThisRecord:) id Record; |
| 41 | @end |
| 42 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-6]]" column="1"><Name>PropertyInClassExtension</Name><USR>c:objc(cs)AppDelegate(py)PropertyInClassExtension</USR><Declaration>- (id)GetterInClassExtension;</Declaration><Abstract><Para> This is PropertyInClassExtension</Para></Abstract></Function>] |
| 43 | |
| 44 | @interface AppDelegate() |
| 45 | /** |
| 46 | \brief This is PropertyInClassExtension |
| 47 | */ |
| 48 | @property (copy, getter = GetterInClassExtension) id PropertyInClassExtension; |
| 49 | |
| 50 | - (id) PropertyInPrimaryClass; |
| 51 | @end |
| 52 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-4]]" column="54"><Name>PropertyInClassExtension</Name><USR>c:objc(cs)AppDelegate(py)PropertyInClassExtension</USR><Declaration>- (id)GetterInClassExtension;</Declaration><Abstract><Para> This is PropertyInClassExtension</Para></Abstract></Function>] |
| 53 | // CHECK: FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}annotate-comments-property-accessor.m" line="[[@LINE-5]]" column="54"><Name>PropertyInClassExtension</Name><USR>c:objc(cs)AppDelegate(py)PropertyInClassExtension</USR><Declaration>- (void)setPropertyInClassExtension:(id)PropertyInClassExtension;</Declaration><Abstract><Para> This is PropertyInClassExtension</Para></Abstract></Function>] |
| 54 | |
| 55 | @implementation AppDelegate |
| 56 | - (id) PropertyInPrimaryClass { return 0; } |
| 57 | @end |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |