aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 84d76c6..8963c9f 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -188,21 +188,10 @@ TEST_F(FormatTestJS, JSDocComments) {
// Break a single line long jsdoc comment pragma.
EXPECT_EQ("/**\n"
- " * @returns {string} jsdoc line 12\n"
- " */",
- format("/** @returns {string} jsdoc line 12 */",
- getGoogleJSStyleWithColumns(20)));
- EXPECT_EQ("/**\n"
" * @returns {string}\n"
" * jsdoc line 12\n"
" */",
format("/** @returns {string} jsdoc line 12 */",
- getGoogleJSStyleWithColumns(25)));
-
- EXPECT_EQ("/**\n"
- " * @returns {string} jsdoc line 12\n"
- " */",
- format("/** @returns {string} jsdoc line 12 */",
getGoogleJSStyleWithColumns(20)));
// FIXME: this overcounts the */ as a continuation of the 12 when breaking.
@@ -2194,6 +2183,16 @@ TEST_F(FormatTestJS, JSDocAnnotations) {
" */",
getGoogleJSStyleWithColumns(ColumnLimit));
}
+ // don't break before @tags
+ verifyFormat("/**\n"
+ " * This\n"
+ " * tag @param\n"
+ " * stays.\n"
+ " */",
+ "/**\n"
+ " * This tag @param stays.\n"
+ " */",
+ getGoogleJSStyleWithColumns(13));
verifyFormat("/**\n"
" * @see http://very/very/long/url/is/long\n"
" */",