diff options
author | Daniel Jasper <djasper@google.com> | 2016-06-14 13:54:38 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-06-14 13:54:38 +0000 |
commit | 4ace26b3754bea5f81194312b1a2f15ffd71fa8f (patch) | |
tree | 24f82aac91aece109c7d44cfa80a5c0f61e55fe8 /unittests | |
parent | 08ab1ac94c47149daeedb67b1a203211fce953c7 (diff) |
clang-format: [JS] Fix failing format with TypeScript casts.
Before, this could be formatted at all (with BracketAlignmentStyle
AlwaysBreak):
foo = <Bar[]>[
1, /* */
2
];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTestJS.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp index 8410a0c996..f71571c16a 100644 --- a/unittests/Format/FormatTestJS.cpp +++ b/unittests/Format/FormatTestJS.cpp @@ -1205,6 +1205,10 @@ TEST_F(FormatTestJS, TemplateStrings) { TEST_F(FormatTestJS, CastSyntax) { verifyFormat("var x = <type>foo;"); verifyFormat("var x = foo as type;"); + verifyFormat("foo = <Bar[]>[\n" + " 1, //\n" + " 2\n" + "];"); } TEST_F(FormatTestJS, TypeArguments) { |