From 2802456097eec57d663c9a53349eb408080ab7af Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 11 Jan 2016 11:00:58 +0000 Subject: 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 --- clang/unittests/Format/FormatTestJS.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/unittests/Format/FormatTestJS.cpp') 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) { -- cgit v1.2.3