diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /unittests/AST/CommentParser.cpp | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'unittests/AST/CommentParser.cpp')
-rw-r--r-- | unittests/AST/CommentParser.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/unittests/AST/CommentParser.cpp b/unittests/AST/CommentParser.cpp index d05fb58..f75c636 100644 --- a/unittests/AST/CommentParser.cpp +++ b/unittests/AST/CommentParser.cpp @@ -628,18 +628,43 @@ TEST_F(CommentParserTest, Basic3) { } } -TEST_F(CommentParserTest, Paragraph1) { +TEST_F(CommentParserTest, ParagraphSplitting1) { const char *Sources[] = { "// Aaa\n" "//\n" "// Bbb", "// Aaa\n" + "// \n" + "// Bbb", + + "// Aaa\n" + "//\t\n" + "// Bbb", + + "// Aaa\n" "//\n" "//\n" "// Bbb", - }; + "/**\n" + " Aaa\n" + "\n" + " Bbb\n" + "*/", + + "/**\n" + " Aaa\n" + " \n" + " Bbb\n" + "*/", + + "/**\n" + " Aaa\n" + "\t \n" + " Bbb\n" + "*/", + }; for (size_t i = 0, e = array_lengthof(Sources); i != e; i++) { FullComment *FC = parseString(Sources[i]); @@ -650,7 +675,7 @@ TEST_F(CommentParserTest, Paragraph1) { } } -TEST_F(CommentParserTest, Paragraph2) { +TEST_F(CommentParserTest, Paragraph1) { const char *Source = "// \\brief Aaa\n" "//\n" @@ -670,7 +695,7 @@ TEST_F(CommentParserTest, Paragraph2) { ASSERT_TRUE(HasParagraphCommentAt(FC, 2, " Bbb")); } -TEST_F(CommentParserTest, Paragraph3) { +TEST_F(CommentParserTest, Paragraph2) { const char *Source = "// \\brief \\author"; FullComment *FC = parseString(Source); @@ -694,7 +719,7 @@ TEST_F(CommentParserTest, Paragraph3) { } } -TEST_F(CommentParserTest, Paragraph4) { +TEST_F(CommentParserTest, Paragraph3) { const char *Source = "// \\brief Aaa\n" "// Bbb \\author\n" |