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
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 35727eb..76c2730 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -408,10 +408,9 @@
" 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) {