[cfe-commits] r170946 - /cfe/trunk/unittests/Format/FormatTest.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Dec 21 14:51:18 PST 2012
Author: fjahanian
Date: Fri Dec 21 16:51:18 2012
New Revision: 170946
URL: http://llvm.org/viewvc/llvm-project?rev=170946&view=rev
Log:
Adding to FormatTest.cpp test for a very long ObjC method
declaration requiring formatting of wrap-arounds.
Modified:
cfe/trunk/unittests/Format/FormatTest.cpp
Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=170946&r1=170945&r2=170946&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Fri Dec 21 16:51:18 2012
@@ -705,6 +705,21 @@
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
More information about the cfe-commits
mailing list