summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDinesh Dwivedi <dinesh.d@samsung.com>2014-05-02 17:01:46 +0000
committerDinesh Dwivedi <dinesh.d@samsung.com>2014-05-02 17:01:46 +0000
commitea3aca8b67cef0079ccf4a4c0935b1bab0727fc7 (patch)
tree702c9262cc4f8249eaa916047b31b3b552e47c1b /clang/unittests/Format/FormatTest.cpp
parent56c582279b5b8c3efde724d047a3110dbe114976 (diff)
downloadbcm5719-llvm-ea3aca8b67cef0079ccf4a4c0935b1bab0727fc7.tar.gz
bcm5719-llvm-ea3aca8b67cef0079ccf4a4c0935b1bab0727fc7.zip
Fixes issue with Allman BreakBeforeBraces for Objective C @interface
Before: @interface BSApplicationController () { @private id _extraIvar; } @end After: @interface BSApplicationController () { @private id _extraIvar; } @end llvm-svn: 207849
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 02a77af4f75..62534c6fbae 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7444,6 +7444,14 @@ TEST_F(FormatTest, AllmanBraceBreaking) {
"}\n",
BreakBeforeBrace);
+ verifyFormat("@interface BSApplicationController ()\n"
+ "{\n"
+ "@private\n"
+ " id _extraIvar;\n"
+ "}\n"
+ "@end\n",
+ BreakBeforeBrace);
+
BreakBeforeBrace.ColumnLimit = 19;
verifyFormat("void f() { int i; }", BreakBeforeBrace);
BreakBeforeBrace.ColumnLimit = 18;
@@ -7564,6 +7572,14 @@ TEST_F(FormatTest, GNUBraceBreaking) {
" Y = 0,\n"
"}\n",
GNUBraceStyle);
+
+ verifyFormat("@interface BSApplicationController ()\n"
+ "{\n"
+ "@private\n"
+ " id _extraIvar;\n"
+ "}\n"
+ "@end\n",
+ GNUBraceStyle);
}
TEST_F(FormatTest, CatchExceptionReferenceBinding) {
verifyFormat("void f() {\n"
OpenPOWER on IntegriCloud