Author: gribozavr
Date: Sat Jan 19 16:04:44 2013
New Revision: 172923

URL: http://llvm.org/viewvc/llvm-project?rev=172923&view=rev
Log:
Comment parsing: add more tests for html character references

Modified:
    cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp
    cfe/trunk/unittests/AST/CommentLexer.cpp

Modified: cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp?rev=172923&r1=172922&r2=172923&view=diff
==============================================================================
--- cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp (original)
+++ cfe/trunk/test/Index/comment-to-html-xml-conversion.cpp Sat Jan 19 16:04:44 
2013
@@ -556,10 +556,10 @@
 // CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace)
 // CHECK-NEXT:         (CXComment_Text Text=[::])))]
 
-/// & < > "
+/// & < > " ' meow 
meow
 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 @@
 // 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();

Modified: cfe/trunk/unittests/AST/CommentLexer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CommentLexer.cpp?rev=172923&r1=172922&r2=172923&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/CommentLexer.cpp (original)
+++ cfe/trunk/unittests/AST/CommentLexer.cpp Sat Jan 19 16:04:44 2013
@@ -1661,7 +1661,8 @@
   const char *Sources[] = {
     "// &#61;",
     "// &#x3d;",
-    "// &#X3d;"
+    "// &#X3d;",
+    "// &#X3D;"
   };
 
   for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) {


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to