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.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 3e5abdc098a..d9176599fb7 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1110,6 +1110,10 @@ TEST_F(FormatTestJS, ForLoops) {
"}");
verifyFormat("for (let {a, b} of x) {\n"
"}");
+ verifyFormat("for (let {a, b} of [x]) {\n"
+ "}");
+ verifyFormat("for (let [a, b] of [x]) {\n"
+ "}");
verifyFormat("for (let {a, b} in x) {\n"
"}");
}
OpenPOWER on IntegriCloud