summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTestObjC.cpp')
-rw-r--r--unittests/Format/FormatTestObjC.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestObjC.cpp b/unittests/Format/FormatTestObjC.cpp
index e56df6d130d25..a417b6710da26 100644
--- a/unittests/Format/FormatTestObjC.cpp
+++ b/unittests/Format/FormatTestObjC.cpp
@@ -584,6 +584,16 @@ TEST_F(FormatTestObjC, FormatObjCMethodDeclarations) {
" aaaaa:(a)yyy\n"
" bbb:(d)cccc;");
verifyFormat("- (void)drawRectOn:(id)surface ofSize:(aaa)height:(bbb)width;");
+
+ // BraceWrapping AfterFunction is respected for ObjC methods
+ Style = getGoogleStyle(FormatStyle::LK_ObjC);
+ Style.BreakBeforeBraces = FormatStyle::BS_Custom;
+ Style.BraceWrapping.AfterFunction = true;
+ verifyFormat("@implementation Foo\n"
+ "- (void)foo:(id)bar\n"
+ "{\n"
+ "}\n"
+ "@end\n");
}
TEST_F(FormatTestObjC, FormatObjCMethodExpr) {