]> granicus.if.org Git - clang/commitdiff
Comment parsing: fold named character references test into other HTML tests
authorDmitri Gribenko <gribozavr@gmail.com>
Wed, 30 Jan 2013 14:44:47 +0000 (14:44 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Wed, 30 Jan 2013 14:44:47 +0000 (14:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173934 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/comment-to-html-xml-conversion.cpp
test/Index/special-html-characters.m [deleted file]

index c6786f81cfc78ce35f5a5e230d80f3f0f35a2c66..da225ba54c6c2548ca68d4c3bcde802af69549f7 100644 (file)
@@ -1,6 +1,8 @@
 // RUN: rm -rf %t
 // RUN: mkdir %t
 
+// This file contains UTF-8 sequences.  Please don't "fix" them!
+
 // Check that we serialize comment source locations properly.
 // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
 // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
@@ -600,6 +602,39 @@ void comment_to_html_conversion_33();
 // CHECK-NEXT:         (CXComment_Text Text=[i])
 // CHECK-NEXT:         (CXComment_HTMLEndTag Name=[em])))]
 
+// rdar://12392215
+/// &copy; the copyright symbol
+/// &trade; the trade mark symbol
+/// &reg; the registered trade mark symbol
+/// &nbsp; a non breakable space.
+/// &Delta; Greek letter Delta Δ.
+/// &Gamma; Greek letter Gamma Γ.
+void comment_to_html_conversion_34();
+
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_34:{{.*}} FullCommentAsHTML=[<p class="para-brief"> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_34</Name><USR>c:@F@comment_to_html_conversion_34#</USR><Declaration>void comment_to_html_conversion_34()</Declaration><Abstract><Para> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</Para></Abstract></Function>]
+// CHECK-NEXT:  CommentAST=[
+// CHECK-NEXT:    (CXComment_FullComment
+// CHECK-NEXT:       (CXComment_Paragraph
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[©])
+// CHECK-NEXT:         (CXComment_Text Text=[ the copyright symbol] HasTrailingNewline)
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[™])
+// CHECK-NEXT:         (CXComment_Text Text=[ the trade mark symbol] HasTrailingNewline)
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[®])
+// CHECK-NEXT:         (CXComment_Text Text=[ the registered trade mark symbol] HasTrailingNewline)
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[ ])
+// CHECK-NEXT:         (CXComment_Text Text=[ a non breakable space.] HasTrailingNewline)
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[Δ])
+// CHECK-NEXT:         (CXComment_Text Text=[ Greek letter Delta Δ.] HasTrailingNewline)
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[Γ])
+// CHECK-NEXT:         (CXComment_Text Text=[ Greek letter Gamma Γ.])))]
+
+
 /// Aaa.
 class comment_to_xml_conversion_01 {
 // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>comment_to_xml_conversion_01</Name><USR>c:@C@comment_to_xml_conversion_01</USR><Declaration>class comment_to_xml_conversion_01 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
diff --git a/test/Index/special-html-characters.m b/test/Index/special-html-characters.m
deleted file mode 100644 (file)
index affda3c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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 -triple x86_64-apple-darwin10 %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
-
-// XFAIL: valgrind
-
-// rdar://12392215
-@interface I
-@end
-
-@implementation I
-/*!
-       &copy; the copyright symbol
-       &trade; the trade mark symbol
-        &reg; the registered trade mark symbol
-       &nbsp; a non breakable space.
-        &Delta; Greek letter Delta Δ.
-        &Gamma; Greek letter Gamma Γ.
- */
-- (void)phoneHome:(id)sender {
-
-}
-@end
-// CHECK: FullCommentAsHTML=[<p class="para-brief">\t© the copyright symbol\t™ the trade mark symbol        ® the registered trade mark symbol\t  a non breakable space.        Δ Greek letter Delta Δ.        Γ Greek letter Gamma Γ. </p>] FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}special-html-characters.m" line="[[@LINE-4]]" column="1"><Name>phoneHome:</Name><USR>c:objc(cs)I(im)phoneHome:</USR><Declaration>- (void)phoneHome:(id)sender;</Declaration><Abstract><Para>\t© the copyright symbol\t™ the trade mark symbol        ® the registered trade mark symbol\t  a non breakable space.        Δ Greek letter Delta Δ.        Γ Greek letter Gamma Γ. </Para></Abstract></Function>]