brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.7 KiB · 32473ea Raw
109 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/*!11     \headerfile Device.h <Foundation/Device.h>12 13      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.14*/15@interface Device16@end17// CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=Device:{{.*}} FullCommentAsXML=[<Other file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-2]]" column="12"><Name>Device</Name><USR>c:objc(cs)Device</USR><Headerfile><Para> Device.h &lt;Foundation/Device.h&gt;</Para></Headerfile><Declaration>@interface Device\n@end</Declaration><Abstract><Para>      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.</Para></Abstract></Other>]18// CHECK-NEXT:  CommentAST=[19// CHECK-NEXT:    (CXComment_FullComment20// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace21// CHECK-NEXT:         (CXComment_Text Text=[     ] IsWhitespace))22// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]23// CHECK-NEXT:         (CXComment_Paragraph24// CHECK-NEXT:           (CXComment_Text Text=[ Device.h ])25// CHECK-NEXT:           (CXComment_Text Text=[<Foundation])26// CHECK-NEXT:           (CXComment_Text Text=[/Device.h>])))27// CHECK-NEXT:       (CXComment_Paragraph28// 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.])))]29 30/*!31    \headerfile Sensor.h "Sensor.h"32 33    \brief This is Sensor on the Device.34    Its purpose is not to Sense Device's heat.35*/36 37@interface Sensor38@end39// CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=Sensor:{{.*}} FullCommentAsXML=[<Other file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-2]]" column="12"><Name>Sensor</Name><USR>c:objc(cs)Sensor</USR><Headerfile><Para> Sensor.h &quot;Sensor.h&quot;</Para></Headerfile><Declaration>@interface Sensor\n@end</Declaration><Abstract><Para> This is Sensor on the Device.    Its purpose is not to Sense Device&apos;s heat.</Para></Abstract></Other>]40// CHECK-NEXT:  CommentAST=[41// CHECK-NEXT:    (CXComment_FullComment42// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace43// CHECK-NEXT:         (CXComment_Text Text=[    ] IsWhitespace))44// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]45// CHECK-NEXT:         (CXComment_Paragraph46// CHECK-NEXT:           (CXComment_Text Text=[ Sensor.h "Sensor.h"])))47// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace48// CHECK-NEXT:         (CXComment_Text Text=[    ] IsWhitespace))49// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]50// CHECK-NEXT:         (CXComment_Paragraph51// CHECK-NEXT:           (CXComment_Text Text=[ This is Sensor on the Device.] HasTrailingNewline)52// CHECK-NEXT:           (CXComment_Text Text=[    Its purpose is not to Sense Device's heat.]))))]53 54/*!55    \brief Test that headerfile can come after brief.56    \headerfile VTDevice.h <VTFoundation/VTDevice.h>57 58    More property description goes here.59*/60@interface VTDevice : Device61@end62// CHECK: headerfile-comment-to-html.m:[[@LINE-2]]:12: ObjCInterfaceDecl=VTDevice:{{.*}} FullCommentAsXML=[<Other file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-2]]" column="12"><Name>VTDevice</Name><USR>c:objc(cs)VTDevice</USR><Headerfile><Para> VTDevice.h &lt;VTFoundation/VTDevice.h&gt;</Para></Headerfile><Declaration>@interface VTDevice : Device\n@end</Declaration><Abstract><Para> Test that headerfile can come after brief.    </Para></Abstract><Discussion><Para>    More property description goes here.</Para></Discussion></Other>]63// CHECK-NEXT:  CommentAST=[64// CHECK-NEXT:    (CXComment_FullComment65// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace66// CHECK-NEXT:         (CXComment_Text Text=[    ] IsWhitespace))67// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[brief]68// CHECK-NEXT:         (CXComment_Paragraph69// CHECK-NEXT:           (CXComment_Text Text=[ Test that headerfile can come after brief.] HasTrailingNewline)70// CHECK-NEXT:           (CXComment_Text Text=[    ] IsWhitespace)))71// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]72// CHECK-NEXT:         (CXComment_Paragraph73// CHECK-NEXT:           (CXComment_Text Text=[ VTDevice.h ])74// CHECK-NEXT:           (CXComment_Text Text=[<VTFoundation])75// CHECK-NEXT:           (CXComment_Text Text=[/VTDevice.h>])))76// CHECK-NEXT:       (CXComment_Paragraph77// CHECK-NEXT:         (CXComment_Text Text=[    More property description goes here.])))]78 79/*!80  \headerfile  <stdio.h>81*/82extern void uses_stdio_h();83// CHECK: headerfile-comment-to-html.m:[[@LINE-1]]:13: FunctionDecl=uses_stdio_h:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-1]]" column="13"><Name>uses_stdio_h</Name><USR>c:@F@uses_stdio_h</USR><Headerfile><Para>  &lt;stdio.h&gt;</Para></Headerfile><Declaration>extern void uses_stdio_h()</Declaration></Function>]84// CHECK-NEXT:  CommentAST=[85// CHECK-NEXT:    (CXComment_FullComment86// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace87// CHECK-NEXT:         (CXComment_Text Text=[  ] IsWhitespace))88// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]89// CHECK-NEXT:         (CXComment_Paragraph90// CHECK-NEXT:           (CXComment_Text Text=[  ] IsWhitespace)91// CHECK-NEXT:           (CXComment_Text Text=[<stdio])92// CHECK-NEXT:           (CXComment_Text Text=[.h>]))))]93 94 95/*!96  \headerfile  <algorithm>97*/98extern void uses_argorithm();99// CHECK: headerfile-comment-to-html.m:[[@LINE-1]]:13: FunctionDecl=uses_argorithm:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}headerfile-comment-to-html.m" line="[[@LINE-1]]" column="13"><Name>uses_argorithm</Name><USR>c:@F@uses_argorithm</USR><Headerfile><Para>  &lt;algorithm&gt;</Para></Headerfile><Declaration>extern void uses_argorithm()</Declaration></Function>]100// CHECK-NEXT:  CommentAST=[101// CHECK-NEXT:    (CXComment_FullComment102// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace103// CHECK-NEXT:         (CXComment_Text Text=[  ] IsWhitespace))104// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[headerfile]105// CHECK-NEXT:         (CXComment_Paragraph106// CHECK-NEXT:           (CXComment_Text Text=[  ] IsWhitespace)107// CHECK-NEXT:           (CXComment_Text Text=[<algorithm])108// CHECK-NEXT:           (CXComment_Text Text=[>]))))]109