summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-04-07 08:20:35 +0000
committerDaniel Jasper <djasper@google.com>2015-04-07 08:20:35 +0000
commitacf67e3ecd26c71bd2581a5b4fca4fed50d46ab8 (patch)
treebeadbffc5eb1e3bf33a78310b1b317d7a8000784 /clang/unittests/Format/FormatTestJS.cpp
parentdd7adf7a185d725b34721c4de446bae77a483fe2 (diff)
downloadbcm5719-llvm-acf67e3ecd26c71bd2581a5b4fca4fed50d46ab8.tar.gz
bcm5719-llvm-acf67e3ecd26c71bd2581a5b4fca4fed50d46ab8.zip
clang-format: Improve nested block formatting.
Before: functionA(functionB({ int i; int j; }), aaaa, bbbb, cccc); After: functionA(functionB({ int i; int j; }), aaaa, bbbb, cccc); llvm-svn: 234304
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 35727eb686b..76c2730960e 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -408,10 +408,9 @@ TEST_F(FormatTestJS, MultipleFunctionLiterals) {
" body();\n"
" });");
- // FIXME: This is bad, but it used to be formatted correctly by accident.
- verifyFormat("getSomeLongPromise().then(function(value) {\n"
- " body();\n"
- "}).thenCatch(function(error) { body(); });");
+ verifyFormat("getSomeLongPromise()\n"
+ " .then(function(value) { body(); })\n"
+ " .thenCatch(function(error) { body(); });");
}
TEST_F(FormatTestJS, ReturnStatements) {
OpenPOWER on IntegriCloud