diff options
author | Daniel Jasper <djasper@google.com> | 2016-01-11 11:00:58 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-01-11 11:00:58 +0000 |
commit | 2802456097eec57d663c9a53349eb408080ab7af (patch) | |
tree | 16c562be2b888bc7a376090483e230a0d9170555 /clang/unittests/Format/FormatTestJS.cpp | |
parent | 524025bd2eed7cc5447fc112f409f3d23790fa72 (diff) | |
download | bcm5719-llvm-2802456097eec57d663c9a53349eb408080ab7af.tar.gz bcm5719-llvm-2802456097eec57d663c9a53349eb408080ab7af.zip |
clang-format: [JS] Improve line-flow when calling functions on array literals.
Before:
return [
aaaaaaaaaaaaaaaaaaaaaa
].aaaaaaa(function() {
//
})
.bbbbbb();
After:
return [aaaaaaaaaaaaaaaaaaaaaa]
.aaaaaaa(function() {
//
})
.bbbbbb();
llvm-svn: 257324
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 4e974d7285d..9477580016a 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -530,6 +530,12 @@ TEST_F(FormatTestJS, MultipleFunctionLiterals) { verifyFormat("getSomeLongPromise()\n" " .then(function(value) { body(); })\n" " .thenCatch(function(error) { body(); });"); + + verifyFormat("return [aaaaaaaaaaaaaaaaaaaaaa]\n" + " .aaaaaaa(function() {\n" + " //\n" + " })\n" + " .bbbbbb();"); } TEST_F(FormatTestJS, ArrowFunctions) { |