[cfe-commits] r160965 - /cfe/trunk/unittests/AST/CommentParser.cpp
Dmitri Gribenko
gribozavr at gmail.com
Mon Jul 30 09:52:52 PDT 2012
Author: gribozavr
Date: Mon Jul 30 11:52:51 2012
New Revision: 160965
URL: http://llvm.org/viewvc/llvm-project?rev=160965&view=rev
Log:
Comment parser: add one more test
Modified:
cfe/trunk/unittests/AST/CommentParser.cpp
Modified: cfe/trunk/unittests/AST/CommentParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CommentParser.cpp?rev=160965&r1=160964&r2=160965&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/CommentParser.cpp (original)
+++ cfe/trunk/unittests/AST/CommentParser.cpp Mon Jul 30 11:52:51 2012
@@ -677,6 +677,25 @@
}
TEST_F(CommentParserTest, ParamCommand1) {
+ const char *Source = "// \\param aaa";
+
+ FullComment *FC = parseString(Source);
+ ASSERT_TRUE(HasChildCount(FC, 2));
+
+ ASSERT_TRUE(HasParagraphCommentAt(FC, 0, " "));
+ {
+ ParamCommandComment *PCC;
+ ParagraphComment *PC;
+ ASSERT_TRUE(HasParamCommandAt(FC, 1, PCC, "param",
+ ParamCommandComment::In,
+ /* IsDirectionExplicit = */ false,
+ "aaa", PC));
+ ASSERT_TRUE(HasChildCount(PCC, 1));
+ ASSERT_TRUE(HasChildCount(PC, 0));
+ }
+}
+
+TEST_F(CommentParserTest, ParamCommand2) {
const char *Sources[] = {
"// \\param aaa Bbb\n",
"// \\param\n"
@@ -705,7 +724,7 @@
}
}
-TEST_F(CommentParserTest, ParamCommand2) {
+TEST_F(CommentParserTest, ParamCommand3) {
const char *Sources[] = {
"// \\param [in] aaa Bbb\n",
"// \\param\n"
@@ -734,7 +753,7 @@
}
}
-TEST_F(CommentParserTest, ParamCommand3) {
+TEST_F(CommentParserTest, ParamCommand4) {
const char *Sources[] = {
"// \\param [out] aaa Bbb\n",
"// \\param\n"
@@ -763,7 +782,7 @@
}
}
-TEST_F(CommentParserTest, ParamCommand4) {
+TEST_F(CommentParserTest, ParamCommand5) {
const char *Sources[] = {
"// \\param [in,out] aaa Bbb\n",
"// \\param [in, out] aaa Bbb\n",
@@ -793,7 +812,7 @@
}
}
-TEST_F(CommentParserTest, ParamCommand5) {
+TEST_F(CommentParserTest, ParamCommand6) {
const char *Source =
"// \\param aaa \\% Bbb \\$ ccc\n";
More information about the cfe-commits
mailing list