From f494e4814010885dbe6abac705244fecae905b40 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Wed, 30 Jan 2013 14:44:47 +0000 Subject: [PATCH] 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 --- test/Index/comment-to-html-xml-conversion.cpp | 35 +++++++++++++++++++ test/Index/special-html-characters.m | 30 ---------------- 2 files changed, 35 insertions(+), 30 deletions(-) delete mode 100644 test/Index/special-html-characters.m 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=[

© the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.

] FullCommentAsXML=[comment_to_html_conversion_34c:@F@comment_to_html_conversion_34#void comment_to_html_conversion_34() © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.] +// 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=[comment_to_xml_conversion_01c:@C@comment_to_xml_conversion_01class comment_to_xml_conversion_01 {} Aaa.] 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=[

\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 Γ.

] FullCommentAsXML=[phoneHome:c:objc(cs)I(im)phoneHome:- (void)phoneHome:(id)sender;\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 Γ. ] -- 2.40.0