brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · cfbb123 Raw
62 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out4// RUN: FileCheck %s < %t/out5 6// Ensure that XML we generate is not invalid.7// RUN: FileCheck %s -check-prefix=WRONG < %t/out8// WRONG-NOT: CommentXMLInvalid9 10@interface AppDelegate11/**12  \brief This is ReadonlyProperty13*/14@property (readonly, getter = ReadonlyGetter) int MyProperty;15// 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>]16 17/**18  \brief This is GeneralProperty19*/20@property int GeneralProperty;21// 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>]22// 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>]23 24/**25  \brief This is PropertyInPrimaryClass26*/27@property (copy, nonatomic) id PropertyInPrimaryClass;28- (void) setThisRecord : (id)arg;29- (id) Record;30@end31// 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>]32// 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>]33 34@interface AppDelegate()35- (id) GetterInClassExtension;36/**37  \brief This is Record38*/39@property (copy, setter = setThisRecord:) id Record;40@end41// 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>]42 43@interface AppDelegate()44/**45  \brief This is PropertyInClassExtension46*/47@property (copy, getter = GetterInClassExtension) id PropertyInClassExtension;48 49- (id) PropertyInPrimaryClass;50@end51// 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>]52// 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>]53  54@implementation AppDelegate55- (id) PropertyInPrimaryClass { return 0; }56@end57 58 59 60 61 62