summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-12-22 15:48:35 +0000
committerDaniel Jasper <djasper@google.com>2015-12-22 15:48:35 +0000
commitb542f9f1442569d6247877ba8bfab51008544e9f (patch)
tree5e0e49ce6dc41364c4e79803a86b8df3117a438f /clang/unittests/Format/FormatTestJS.cpp
parente2deb59fa3e1e13991b0fe370781d92913767717 (diff)
downloadbcm5719-llvm-b542f9f1442569d6247877ba8bfab51008544e9f.tar.gz
bcm5719-llvm-b542f9f1442569d6247877ba8bfab51008544e9f.zip
clang-format: [JS] Support arrays of object-type literals.
Before: interface I { o: {} []; } After: interface I { o: {}[]; } llvm-svn: 256247
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 93a4eba4a93..9bfd587412d 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -768,6 +768,11 @@ TEST_F(FormatTestJS, InterfaceDeclarations) {
verifyFormat("interface a {}\n"
"export function b() {}\n"
"var x;");
+
+ // Arrays of object type literals.
+ verifyFormat("interface I {\n"
+ " o: {}[];\n"
+ "}");
}
TEST_F(FormatTestJS, EnumDeclarations) {
OpenPOWER on IntegriCloud