summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 9cf4efcbf1f..94d4bbb00ef 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7698,15 +7698,23 @@ TEST_F(FormatTest, AllmanBraceBreaking) {
"#endif",
BreakBeforeBrace);
- // This shouldn't affect ObjC blocks.
+ // This shouldn't affect ObjC blocks..
verifyFormat("[self doSomeThingWithACompletionHandler:^{\n"
" // ...\n"
" int i;\n"
- "}];");
+ "}];",
+ BreakBeforeBrace);
verifyFormat("void (^block)(void) = ^{\n"
" // ...\n"
" int i;\n"
- "};");
+ "};",
+ BreakBeforeBrace);
+ // .. or dict literals.
+ verifyFormat("void f()\n"
+ "{\n"
+ " [object someMethod:@{ @\"a\" : @\"b\" }];\n"
+ "}",
+ BreakBeforeBrace);
BreakBeforeBrace.ColumnLimit = 19;
verifyFormat("void f() { int i; }", BreakBeforeBrace);
OpenPOWER on IntegriCloud