summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-10 19:19:14 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-10 19:19:14 +0000
commit2bb0074232f5049c87b1f8026267a5e28c12f08f (patch)
tree782ce7761a519e7226feb62fad97d4bdbe428689 /clang/unittests/Format/FormatTest.cpp
parentb2c6dbec5208bbb19956f1c8e8da3c429c74756b (diff)
downloadbcm5719-llvm-2bb0074232f5049c87b1f8026267a5e28c12f08f.tar.gz
bcm5719-llvm-2bb0074232f5049c87b1f8026267a5e28c12f08f.zip
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. llvm-svn: 172093
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 1d9363dc2e4..077c358c22b 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/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");
}
OpenPOWER on IntegriCloud