diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-30 14:44:47 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-30 14:44:47 +0000 |
commit | f494e4814010885dbe6abac705244fecae905b40 (patch) | |
tree | 958ca41e3063c6e98a99076e01f1632cb69ccf82 | |
parent | 5bd1e5ba000023910ad986a16dd16d7ca914750a (diff) |
Comment parsing: fold named character references test into other HTML tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173934 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Index/comment-to-html-xml-conversion.cpp | 35 | ||||
-rw-r--r-- | test/Index/special-html-characters.m | 30 |
2 files changed, 35 insertions, 30 deletions
diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp index c6786f81cf..da225ba54c 100644 --- a/test/Index/comment-to-html-xml-conversion.cpp +++ b/test/Index/comment-to-html-xml-conversion.cpp @@ -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 +/// © the copyright symbol +/// ™ the trade mark symbol +/// ® the registered trade mark symbol +/// a non breakable space. +/// Δ Greek letter Delta Δ. +/// Γ 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 index affda3c424..0000000000 --- a/test/Index/special-html-characters.m +++ /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 -/*! - © the copyright symbol - ™ the trade mark symbol - ® the registered trade mark symbol - a non breakable space. - Δ Greek letter Delta Δ. - Γ 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>] |