summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-15 09:23:17 +0000
committerDaniel Jasper <djasper@google.com>2015-06-15 09:23:17 +0000
commitb2ad4d4c261a336472c7c2b92b698d37e70b1737 (patch)
tree2540a23c07a1c5eba41d32e6067fc232aa9adc2d /clang/unittests/Format/FormatTestJS.cpp
parentd6d12a11926a76ca1d006cb2a41da37ebff059d0 (diff)
downloadbcm5719-llvm-b2ad4d4c261a336472c7c2b92b698d37e70b1737.tar.gz
bcm5719-llvm-b2ad4d4c261a336472c7c2b92b698d37e70b1737.zip
clang-format: [JS] Tweak behavior for multiline array initializer parameters
Before: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); After: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); llvm-svn: 239722
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 5b01832ef45..7c8b3fce42b 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -278,6 +278,13 @@ TEST_F(FormatTestJS, ArrayLiterals) {
" bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
" ccccccccccccccccccccccccccc\n"
"]);");
+ verifyFormat("var someVariable = SomeFuntion(aaaa,\n"
+ " [\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+ " bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
+ " ccccccccccccccccccccccccccc\n"
+ " ],\n"
+ " aaaa);");
verifyFormat("someFunction([], {a: a});");
}
OpenPOWER on IntegriCloud