summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppdoxygen_test.cpp
diff options
context:
space:
mode:
authorLorenz Haas <lykurg@gmail.com>2015-02-07 20:53:34 +0100
committerLorenz Haas <lykurg@gmail.com>2015-02-17 13:16:14 +0000
commitb4902e5f1beef4ccde7b2f4711be28295af5d23a (patch)
tree2af910030434d129ae867946e280a85882a83739 /src/plugins/cppeditor/cppdoxygen_test.cpp
parent5a3a940ad3b3984b308b539e7f0456ce11d4d90e (diff)
downloadqt-creator-b4902e5f1beef4ccde7b2f4711be28295af5d23a.tar.gz
CppEditor: Fix Doxygen continuation handling for "//!"
Change-Id: Ib1e3183a85b55a894964f56458512aca1fafc2ea Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/cppeditor/cppdoxygen_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppdoxygen_test.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cppdoxygen_test.cpp b/src/plugins/cppeditor/cppdoxygen_test.cpp
index d5d2afb008..830c67ba97 100644
--- a/src/plugins/cppeditor/cppdoxygen_test.cpp
+++ b/src/plugins/cppeditor/cppdoxygen_test.cpp
@@ -162,6 +162,21 @@ void DoxygenTest::testBasic_data()
"int a;\n"
);
+ QTest::newRow("cpp_styleB_continuation") << _(
+ "bool preventFolding;\n"
+ "//!\n"
+ "//! \\brief a|\n"
+ "//!\n"
+ "int a;\n"
+ ) << _(
+ "bool preventFolding;\n"
+ "//!\n"
+ "//! \\brief a\n"
+ "//! \n"
+ "//!\n"
+ "int a;\n"
+ );
+
/// test cpp style doxygen comment when inside a indented scope
QTest::newRow("cpp_styleA_indented") << _(
" bool preventFolding;\n"
@@ -175,6 +190,18 @@ void DoxygenTest::testBasic_data()
" int a;\n"
);
+ QTest::newRow("cpp_styleB_indented") << _(
+ " bool preventFolding;\n"
+ " //!|\n"
+ " int a;\n"
+ ) << _(
+ " bool preventFolding;\n"
+ " //!\n"
+ " //! \\brief a\n"
+ " //!\n"
+ " int a;\n"
+ );
+
/// test cpp style doxygen comment continuation when inside a indented scope
QTest::newRow("cpp_styleA_indented_continuation") << _(
" bool preventFolding;\n"
@@ -191,6 +218,21 @@ void DoxygenTest::testBasic_data()
" int a;\n"
);
+ QTest::newRow("cpp_styleB_indented_continuation") << _(
+ " bool preventFolding;\n"
+ " //!\n"
+ " //! \\brief a|\n"
+ " //!\n"
+ " int a;\n"
+ ) << _(
+ " bool preventFolding;\n"
+ " //!\n"
+ " //! \\brief a\n"
+ " //! \n"
+ " //!\n"
+ " int a;\n"
+ );
+
QTest::newRow("cpp_styleA_corner_case") << _(
"bool preventFolding;\n"
"///\n"
@@ -202,6 +244,17 @@ void DoxygenTest::testBasic_data()
"\n"
);
+ QTest::newRow("cpp_styleB_corner_case") << _(
+ "bool preventFolding;\n"
+ "//!\n"
+ "void d(); //!|\n"
+ ) << _(
+ "bool preventFolding;\n"
+ "//!\n"
+ "void d(); //!\n"
+ "\n"
+ );
+
QTest::newRow("noContinuationForExpressionAndComment1") << _(
"bool preventFolding;\n"
"*foo //|\n"