clang-format: [JS] do not wrap after "readonly".
Summary:
Breaks after "readonly" trigger automatic semicolon insertion in field
declarations.
Reviewers: krasimir, djasper
Subscribers: klimek
Differential Revision: https://reviews.llvm.org/D35112
llvm-svn: 307394
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 8c60681..11e386a 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -930,6 +930,14 @@
" aaa\n"
"];",
getGoogleJSStyleWithColumns(12));
+ verifyFormat("class X {\n"
+ " readonly ratherLongField =\n"
+ " 1;\n"
+ "}",
+ "class X {\n"
+ " readonly ratherLongField = 1;\n"
+ "}",
+ getGoogleJSStyleWithColumns(20));
}
TEST_F(FormatTestJS, AutomaticSemicolonInsertionHeuristic) {