summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-10 20:18:33 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-10 20:18:33 +0000
commitd6f962f15112f26ea613bb7259577530b4ac86bf (patch)
tree467983d2efefa9ecb581a83b44b792f1a2f22ea6 /clang/unittests/Format/FormatTest.cpp
parenta608775ba2d5557887a55f5f1fbfacdf366db37c (diff)
downloadbcm5719-llvm-d6f962f15112f26ea613bb7259577530b4ac86bf.tar.gz
bcm5719-llvm-d6f962f15112f26ea613bb7259577530b4ac86bf.zip
Formatter: Add test for template and protocol parameters in ObjC method declarations.
llvm-svn: 172100
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 9d29880722d..5844853e05d 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1176,6 +1176,12 @@ TEST_F(FormatTest, FormatForObjectiveCMethodDecls) {
"outRange4:(NSRange) out_range4 outRange5:(NSRange) out_range5 "
"outRange6:(NSRange) out_range6 outRange7:(NSRange) out_range7 "
"outRange8:(NSRange) out_range8 outRange9:(NSRange) out_range9;"));
+
+ verifyFormat("- (int)sum:(vector<int>)numbers;");
+ 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;");
}
TEST_F(FormatTest, FormatObjCBlocks) {
OpenPOWER on IntegriCloud