summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
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 a06daac24ec..a536926c73c 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -239,6 +239,13 @@ TEST_F(FormatTestJS, FormatsFreestandingFunctions) {
"}");
}
+TEST_F(FormatTestJS, ArrayLiterals) {
+ verifyFormat("var aaaaa: List<SomeThing> = [\n"
+ " new SomeThingAAAAAAAAAAAA(),\n"
+ " new SomeThingBBBBBBBBB()\n"
+ "];");
+}
+
TEST_F(FormatTestJS, FunctionLiterals) {
verifyFormat("doFoo(function() {});");
verifyFormat("doFoo(function() { return 1; });");
OpenPOWER on IntegriCloud