// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out
// RUN: FileCheck %s < %t/out
// Ensure that XML we generate is not invalid.
// RUN: FileCheck %s -check-prefix=WRONG < %t/out
// WRONG-NOT: CommentXMLInvalid
// rdar://12378714
/**
* \brief This is a protocol definition
*/
// CHECK: <Declaration>@protocol MyProto\n@end</Declaration>
// CHECK: <Declaration>- (unsigned int)MethodMyProto:(nullable id)anObject inRange:(unsigned int)range;</Declaration>
// CHECK: <Declaration>@optional\n@property(atomic, copy, readwrite, nonnull) id PropertyMyProto;</Declaration>
// CHECK: <Declaration>+ (id)ClassMethodMyProto;</Declaration>
/**
* \brief NSObject is the root class.
*/
// CHECK: Declaration>@interface NSObject {\n id IvarNSObject;\n}\n@end</Declaration>
// CHECK: <Declaration>id IvarNSObject</Declaration>
/**
* \brief MyClass - primary class.
*/
// CHECK: <Declaration>@interface MyClass : NSObject <MyProto> {\n id IvarMyClass;\n}\n@end</Declaration>
// CHECK: <Declaration>id IvarMyClass</Declaration>
// CHECK: <Declaration>- (id)MethodMyClass;</Declaration>
// CHECK: <Declaration>+ (id)ClassMethodMyClass;</Declaration>
// CHECK: <Declaration>@property(atomic, copy, readwrite) id PropertyMyClass;</Declaration
/**
* \brief - This is class extension of MyClass
*/
// CHECK: <Declaration>@interface MyClass () {\n id IvarMyClassExtension;\n}\n@end</Declaration>
// CHECK: <Declaration>id IvarMyClassExtension</Declaration>
/**
* \brief MyClass (Category) is private to MyClass.
*/
// CHECK: <Declaration>@interface MyClass (Category)\n@end</Declaration>
// CHECK: <Declaration>- (void)MethodMyClassCategory;</Declaration>
// CHECK: <Declaration>@property(atomic, copy, readwrite) id PropertyMyClassCategory;</Declaration>
// CHECK: <Declaration>- (id)PropertyMyClassCategory;</Declaration>
// CHECK: <Declaration>- (void)setPropertyMyClassCategory:(id)arg;</Declaration>
/// @implementation's
/**
* \brief implementation of MyClass class.
*/
// CHECK: <Declaration>@implementation MyClass {\n id IvarPrivateToMyClassImpl;\n id _PropertyMyClass;\n}\n@end</Declaration>
// CHECK: <Declaration>id IvarPrivateToMyClassImpl</Declaration>
// CHECK: <Declaration>- (id)MethodMyClass;</Declaration>
// CHECK: <Declaration>+ (id)ClassMethodMyClass;</Declaration>
/**
* \brief MyClass (Category) is implementation of private to MyClass.
*/
// CHECK: <Declaration>@implementation MyClass (Category)\n@end</Declaration>
// CHECK: <Declaration>- (void)MethodMyClassCategory;</Declaration>
// CHECK: <Declaration>- (id)PropertyMyClassCategory;</Declaration>
// CHECK: <Declaration>- (void)setPropertyMyClassCategory:(id)arg;</Declaration>
/**
* \brief NSObject implementation
*/
// CHECK: <Declaration>@implementation NSObject\n@end</Declaration>