]> granicus.if.org Git - clang/commitdiff
Comment parsing: add more tests for html character references
authorDmitri Gribenko <gribozavr@gmail.com>
Sat, 19 Jan 2013 22:04:44 +0000 (22:04 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Sat, 19 Jan 2013 22:04:44 +0000 (22:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172923 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/comment-to-html-xml-conversion.cpp
unittests/AST/CommentLexer.cpp

index c90470afd9e345de4d9169fcdb3591a65d3018c1..f2313a49350efbbae118d055329665c0e0565aef 100644 (file)
@@ -556,10 +556,10 @@ void comment_to_html_conversion_31();
 // CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
 // CHECK-NEXT:         (CXComment_Text Text=[::])))]
 
-/// &amp; &lt; &gt; &quot;
+/// &amp; &lt; &gt; &quot; &apos; &#109;&#101;&#111;&#119; &#x6d;&#x65;&#x6F;&#X77;
 void comment_to_html_conversion_32();
 
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_32:{{.*}} FullCommentAsHTML=[<p class="para-brief"> &amp; &lt; &gt; &quot;</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_32</Name><USR>c:@F@comment_to_html_conversion_32#</USR><Declaration>void comment_to_html_conversion_32()</Declaration><Abstract><Para> &amp; &lt; &gt; &quot;</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_32:{{.*}} FullCommentAsHTML=[<p class="para-brief"> &amp; &lt; &gt; &quot;</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_32</Name><USR>c:@F@comment_to_html_conversion_32#</USR><Declaration>void comment_to_html_conversion_32()</Declaration><Abstract><Para> &amp; &lt; &gt; &quot; &apos; meow  meow</Para></Abstract></Function>]
 // CHECK-NEXT:  CommentAST=[
 // CHECK-NEXT:    (CXComment_FullComment
 // CHECK-NEXT:       (CXComment_Paragraph
@@ -570,7 +570,19 @@ void comment_to_html_conversion_32();
 // CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
 // CHECK-NEXT:         (CXComment_Text Text=[>])
 // CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
-// CHECK-NEXT:         (CXComment_Text Text=["])))]
+// CHECK-NEXT:         (CXComment_Text Text=["])
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=['])
+// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[m])
+// CHECK-NEXT:         (CXComment_Text Text=[e])
+// CHECK-NEXT:         (CXComment_Text Text=[o])
+// CHECK-NEXT:         (CXComment_Text Text=[w])
+// CHECK-NEXT:         (CXComment_Text Text=[  ] IsWhitespace)
+// CHECK-NEXT:         (CXComment_Text Text=[m])
+// CHECK-NEXT:         (CXComment_Text Text=[e])
+// CHECK-NEXT:         (CXComment_Text Text=[o])
+// CHECK-NEXT:         (CXComment_Text Text=[w])))]
 
 /// <em>0&lt;i</em>
 void comment_to_html_conversion_33();
index c496176a36a3829ce73750b87f08a1cf82b7d46f..f73870972e948dd8ef94a32a7ccaea91cb097462 100644 (file)
@@ -1661,7 +1661,8 @@ TEST_F(CommentLexerTest, HTMLCharacterReferences16) {
   const char *Sources[] = {
     "// &#61;",
     "// &#x3d;",
-    "// &#X3d;"
+    "// &#X3d;",
+    "// &#X3D;"
   };
 
   for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {