mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 03:44:59 +00:00
Formatter: Add tests for some ObjC bits that happen to be formatted correctly.
llvm-svn: 171875
This commit is contained in:
parent
9f20781bad
commit
7e6a7a19e3
@ -1071,6 +1071,10 @@ TEST_F(FormatTest, IncorrectCodeErrorDetection) {
|
||||
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Objective-C tests.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
TEST_F(FormatTest, FormatForObjectiveCMethodDecls) {
|
||||
verifyFormat("- (void)sendAction:(SEL)aSelector to:(BOOL)anObject;");
|
||||
EXPECT_EQ("- (NSUInteger)indexOfObject:(id)anObject;",
|
||||
@ -1140,5 +1144,14 @@ TEST_F(FormatTest, ObjCAt) {
|
||||
verifyFormat("@ /*foo*/ interface");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, ObjCOneLiners) {
|
||||
verifyFormat("@class Foo, Bar;");
|
||||
verifyFormat("@synthesize dropArrowPosition = dropArrowPosition_;");
|
||||
verifyFormat("@dynamic textColor;");
|
||||
|
||||
// FIXME: "getter=bar" should not be surround by spaces in @property.
|
||||
verifyFormat("@property(assign, nonatomic) CGFloat hoverAlpha;");
|
||||
}
|
||||
|
||||
} // end namespace tooling
|
||||
} // end namespace clang
|
||||
|
Loading…
Reference in New Issue
Block a user