diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 4b15e7b7da33..78c9f887a159 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -1753,6 +1753,10 @@ TEST_F(FormatTestJS, ClassDeclarations) { " x: {y: Z;} = {};\n" " private y: {y: Z;} = {};\n" "}"); + verifyFormat("class Foo {\n" + " private addGrammarCheckOneboxProductInfo(\n" + " productInfo: {[key: string]: string;}) {}\n" + "}"); // ':' is not a type declaration here. verifyFormat("class X {\n" @@ -2157,6 +2161,13 @@ TEST_F(FormatTestJS, TemplateStringMultiLineExpression) { " aaaa: aaaaa,\n" " bbbb: bbbbb,\n" " })}`;"); + + verifyFormat("`${\n" + " (\n" + " FOOFOOFOOFOO____FOO_FOO_FO_FOO_FOOO -\n" + " (barbarbarbar____bar_bar_bar_bar_bar_bar +\n" + " bar_bar_bar_barbarbar___bar_bar_bar + 1),\n" + " )}`;"); } TEST_F(FormatTestJS, TemplateStringASI) { |
