diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-17 06:14:50 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-17 06:14:50 +0000 |
commit | aab60054553c35f6761cf96f3476997f250f1f4a (patch) | |
tree | 837765901b2490611ddef11d9f28478ed2fc3874 /unittests/Format/FormatTest.cpp | |
parent | 93c8617bec98aeb769ee9f569d7ed439eec03249 (diff) |
Revert most of r172140.
r172140 changed the formatter to produce "-(id) foo" instead of "- (id)foo"
in google style, with a link to
http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml#Method_Declarations_and_Definitions
as reference. But now that I look at that link again, it seems I didn't
read it very carefully the first time round.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index df050a4e29..bd0fcbcf2c 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -1473,13 +1473,13 @@ TEST_F(FormatTest, FormatForObjectiveCMethodDecls) { "outRange8:(NSRange) out_range8 outRange9:(NSRange) out_range9;")); verifyFormat("- (int)sum:(vector<int>)numbers;"); - verifyGoogleFormat("-(void) setDelegate:(id<Protocol>)delegate;"); + verifyGoogleFormat("- (void)setDelegate:(id<Protocol>)delegate;"); // FIXME: In LLVM style, there should be a space in front of a '<' for ObjC // protocol lists (but not for template classes): //verifyFormat("- (void)setDelegate:(id <Protocol>)delegate;"); verifyFormat("- (int(*)())foo:(int(*)())f;"); - verifyGoogleFormat("-(int(*)()) foo:(int(*)())foo;"); + verifyGoogleFormat("- (int(*)())foo:(int(*)())foo;"); // If there's no return type (very rare in practice!), LLVM and Google style // agree. @@ -1517,7 +1517,7 @@ TEST_F(FormatTest, FormatObjCInterface) { " @package\n" " int field4;\n" "}\n" - "+(id) init;\n" + "+ (id)init;\n" "@end"); verifyFormat("@interface Foo\n" @@ -1540,7 +1540,7 @@ TEST_F(FormatTest, FormatObjCInterface) { "@end"); verifyGoogleFormat("@interface Foo : Bar<Baz, Quux>\n" - "+(id) init;\n" + "+ (id)init;\n" "@end"); verifyFormat("@interface Foo (HackStuff)\n" @@ -1556,7 +1556,7 @@ TEST_F(FormatTest, FormatObjCInterface) { "@end"); verifyGoogleFormat("@interface Foo (HackStuff)<MyProtocol>\n" - "+(id) init;\n" + "+ (id)init;\n" "@end"); verifyFormat("@interface Foo {\n" @@ -1620,7 +1620,7 @@ TEST_F(FormatTest, FormatObjCImplementation) { " @package\n" " int field4;\n" "}\n" - "+(id) init {}\n" + "+ (id)init {}\n" "@end"); verifyFormat("@implementation Foo\n" @@ -1675,7 +1675,7 @@ TEST_F(FormatTest, FormatObjCProtocol) { "@end"); verifyGoogleFormat("@protocol MyProtocol<NSObject>\n" - "-(NSUInteger) numberOfThings;\n" + "- (NSUInteger)numberOfThings;\n" "@end"); verifyFormat("@protocol Foo;\n" |