diff options
| author | Daniel Jasper <djasper@google.com> | 2016-11-29 09:40:36 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2016-11-29 09:40:36 +0000 |
| commit | e98e58111b16cfe8877965b6cf417a808084597e (patch) | |
| tree | a087438abe6bc4db3b8acc52ebf34fb23bb7838f /clang/unittests/Format/FormatTestJS.cpp | |
| parent | 22ed262c239cac166d67bc30f3ee0aa45bb15745 (diff) | |
| download | bcm5719-llvm-e98e58111b16cfe8877965b6cf417a808084597e.tar.gz bcm5719-llvm-e98e58111b16cfe8877965b6cf417a808084597e.zip | |
clang-format: [JS] Properly format dict literals that skip labels.
llvm-svn: 288121
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 90a12941bb1..6f494db71d1 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -259,6 +259,13 @@ TEST_F(FormatTestJS, ContainerLiterals) { " b: b,\n" " 'c': c,\n" "};"); + + // Dict literals can skip the label names. + verifyFormat("var x = {\n" + " aaa,\n" + " aaa,\n" + " aaa,\n" + "};"); } TEST_F(FormatTestJS, MethodsInObjectLiterals) { |

