// 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 %s > %t/out // RUN: FileCheck %s < %t/out // rdar://13067629 // Ensure that XML we generate is not invalid. // RUN: FileCheck %s -check-prefix=WRONG < %t/out // WRONG-NOT: CommentXMLInvalid // rdar://12397511 /*! \headerfile Device.h A Device represents a remote or local computer or device with which the Developer Tools can interact. Each Device supports blah blah blah from doing blah blah blah. */ @interface Device @end // CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=Device:{{.*}} FullCommentAsXML=[Devicec:objc(cs)Device Device.h <Foundation/Device.h>@interface Device\n@end A Device represents a remote or local computer or device with which the Developer Tools can interact. Each Device supports blah blah blah from doing blah blah blah.] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[headerfile] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ Device.h ]) // CHECK-NEXT: (CXComment_Text Text=[]))) // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ A Device represents a remote or local computer or device with which the Developer Tools can interact. Each Device supports blah blah blah from doing blah blah blah.])))] /*! \headerfile Sensor.h "Sensor.h" \brief This is Sensor on the Device. Its purpose is not to Sense Device's heat. */ @interface Sensor @end // CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=Sensor:{{.*}} FullCommentAsXML=[Sensorc:objc(cs)Sensor Sensor.h "Sensor.h"@interface Sensor\n@end This is Sensor on the Device. Its purpose is not to Sense Device's heat.] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[headerfile] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ Sensor.h "Sensor.h"]))) // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ This is Sensor on the Device.] HasTrailingNewline) // CHECK-NEXT: (CXComment_Text Text=[ Its purpose is not to Sense Device's heat.]))))] /*! \brief Test that headerfile can come after brief. \headerfile VTDevice.h More property decription goes here. */ @interface VTDevice : Device @end // CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=VTDevice:{{.*}} FullCommentAsXML=[VTDevicec:objc(cs)VTDevice VTDevice.h <VTFoundation/VTDevice.h>@interface VTDevice : Device\n@end Test that headerfile can come after brief. More property decription goes here.] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ Test that headerfile can come after brief.] HasTrailingNewline) // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[headerfile] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ VTDevice.h ]) // CHECK-NEXT: (CXComment_Text Text=[]))) // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ More property decription goes here.])))] /*! \headerfile */ extern void uses_stdio_h(); // CHECK: headerfile-comment-to-html.m:[[@LINE-1]]:13: FunctionDecl=uses_stdio_h:{{.*}} FullCommentAsXML=[uses_stdio_hc:@F@uses_stdio_h <stdio.h>extern void uses_stdio_h()] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[headerfile] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) // CHECK-NEXT: (CXComment_Text Text=[]))))] /*! \headerfile */ extern void uses_argorithm(); // CHECK: headerfile-comment-to-html.m:[[@LINE-1]]:13: FunctionDecl=uses_argorithm:{{.*}} FullCommentAsXML=[uses_argorithmc:@F@uses_argorithm <algorithm>extern void uses_argorithm()] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph IsWhitespace // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) // CHECK-NEXT: (CXComment_BlockCommand CommandName=[headerfile] // CHECK-NEXT: (CXComment_Paragraph // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) // CHECK-NEXT: (CXComment_Text Text=[]))))]