aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTestJS.cpp')
-rw-r--r--unittests/Format/FormatTestJS.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp
index e84f470687ec..11e386a1c7c7 100644
--- a/unittests/Format/FormatTestJS.cpp
+++ b/unittests/Format/FormatTestJS.cpp
@@ -930,6 +930,14 @@ TEST_F(FormatTestJS, WrapRespectsAutomaticSemicolonInsertion) {
" 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) {
@@ -1622,6 +1630,7 @@ TEST_F(FormatTestJS, NestedTemplateStrings) {
TEST_F(FormatTestJS, TaggedTemplateStrings) {
verifyFormat("var x = html`<ul>`;");
+ verifyFormat("yield `hello`;");
}
TEST_F(FormatTestJS, CastSyntax) {