diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-12-21 22:51:18 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-12-21 22:51:18 +0000 |
commit | 9b3f02c3526e31fcb9c41afef143eae73643e257 (patch) | |
tree | 2c0130d3fd72796742b121e79847f61df6885433 /unittests/Format/FormatTest.cpp | |
parent | d3292c88ad6360823818b78d67875eceb3caedfb (diff) |
Adding to FormatTest.cpp test for a very long ObjC method
declaration requiring formatting of wrap-arounds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index b33206b404..f954c14ef7 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -705,6 +705,21 @@ TEST_F(FormatTest, FormatForObjectiveCMethodDecls) { format("- (id)Method6:(id)A:(id)B:(id)C:(id)D;")); EXPECT_EQ("- (void)sendAction:(SEL)aSelector to:(id)anObject forAllCells:(BOOL)flag;", format("- (void)sendAction:(SEL)aSelector to:(id)anObject forAllCells:(BOOL)flag;")); + + // Very long objectiveC method declaration. + EXPECT_EQ("- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range\n " + "outRange:(NSRange)out_range outRange1:(NSRange)out_range1\n " + "outRange2:(NSRange)out_range2 outRange3:(NSRange)out_range3\n " + "outRange4:(NSRange)out_range4 outRange5:(NSRange)out_range5\n " + "outRange6:(NSRange)out_range6 outRange7:(NSRange)out_range7\n " + "outRange8:(NSRange)out_range8 outRange9:(NSRange)out_range9;", + + format("- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range " + "outRange:(NSRange) out_range outRange1:(NSRange) out_range1 " + "outRange2:(NSRange) out_range2 outRange3:(NSRange) out_range3 " + "outRange4:(NSRange) out_range4 outRange5:(NSRange) out_range5 " + "outRange6:(NSRange) out_range6 outRange7:(NSRange) out_range7 " + "outRange8:(NSRange) out_range8 outRange9:(NSRange) out_range9;")); } } // end namespace tooling |