diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-10 19:19:14 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-10 19:19:14 +0000 |
commit | ed91bbaa8c4c92a1c94c9a7a5f4141551718cf6b (patch) | |
tree | 1f120c5e44c207bcf3fa215827cef3f44532e120 /unittests/Format/FormatTest.cpp | |
parent | 94fc6f15d99a16abe6c28a7baa3f2358450920d1 (diff) |
Formatter: Add space before '(' in @implemenation, @interface, @protocol lines
The first token in @implementation, @interface, and @protocol lines is now
marked TT_ObjCDecl, and lines starting with a TT_ObjCDecl token are now marked
LT_ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 1d9363dc2e..077c358c22 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -1232,16 +1232,15 @@ TEST_F(FormatTest, FormatObjCInterface) { "+ (id)init;\n" "@end"); - // FIXME: there should be a space before '(' for categories. - verifyFormat("@interface Foo(HackStuff)\n" + verifyFormat("@interface Foo (HackStuff)\n" "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo()\n" + verifyFormat("@interface Foo ()\n" "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo(HackStuff)<MyProtocol>\n" + verifyFormat("@interface Foo (HackStuff)<MyProtocol>\n" "+ (id)init;\n" "@end"); @@ -1263,19 +1262,19 @@ TEST_F(FormatTest, FormatObjCInterface) { "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo(HackStuff) {\n" + verifyFormat("@interface Foo (HackStuff) {\n" " int _i;\n" "}\n" "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo() {\n" + verifyFormat("@interface Foo () {\n" " int _i;\n" "}\n" "+ (id)init;\n" "@end"); - verifyFormat("@interface Foo(HackStuff)<MyProtocol> {\n" + verifyFormat("@interface Foo (HackStuff)<MyProtocol> {\n" " int _i;\n" "}\n" "+ (id)init;\n" @@ -1341,8 +1340,7 @@ TEST_F(FormatTest, FormatObjCImplementation) { "+ (id)init {}\n" "@end"); - // FIXME: there should be a space before '(' for categories. - verifyFormat("@implementation Foo(HackStuff)\n" + verifyFormat("@implementation Foo (HackStuff)\n" "+ (id)init {}\n" "@end"); } |