summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestObjC.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
commit676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch)
tree02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /unittests/Format/FormatTestObjC.cpp
parentc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff)
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) {