summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
authorMartin Probst <martin@probst.io>2016-07-09 15:09:22 +0000
committerMartin Probst <martin@probst.io>2016-07-09 15:09:22 +0000
commita8c9d154b81e755e9a7181d9fded24de587b2473 (patch)
tree7edd5d8febfc6bf149f808b2b90b04dfdc5a4ffe /clang/unittests
parent6ec90ec2ab69bff816bff52ec02151fe82be8147 (diff)
downloadbcm5719-llvm-a8c9d154b81e755e9a7181d9fded24de587b2473.tar.gz
bcm5719-llvm-a8c9d154b81e755e9a7181d9fded24de587b2473.zip
clang-format: [JS] support trailing commas in imports.
Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D22147 llvm-svn: 274976
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/SortImportsTestJS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/SortImportsTestJS.cpp b/clang/unittests/Format/SortImportsTestJS.cpp
index cc408ca9da7..769fa793da3 100644
--- a/clang/unittests/Format/SortImportsTestJS.cpp
+++ b/clang/unittests/Format/SortImportsTestJS.cpp
@@ -236,6 +236,10 @@ TEST_F(SortImportsTestJS, SortingCanShrink) {
"1;");
}
+TEST_F(SortImportsTestJS, TrailingComma) {
+ verifySort("import {A, B,} from 'aa';\n", "import {B, A,} from 'aa';\n");
+}
+
} // end namespace
} // end namespace format
} // end namespace clang
OpenPOWER on IntegriCloud