aboutsummaryrefslogtreecommitdiff
path: root/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
commite0fd429757fb4cf801643200b2fb709cd7a957ad (patch)
tree093f71504009d162e6235c04dae578198021fc0d /unittests/Format/FormatTest.cpp
parent5f500df1b28e6b1c49d4256dda130ecd8696ea2e (diff)
Formatter: Add test for template and protocol parameters in ObjC method declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 9d29880722..5844853e05 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/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) {