[ios] Silence MGLCalloutView related warnings in tests (#6231)

The annotation view test uses a fake MGLTestCalloutView that
declares conformance to the MGLCalloutView protocol. However,
several properties and a method were not implemented in the test
which caused several warnings that were visible if you compiled
the SDK tests. This change stubs out the properties and method
so the warnings go away.
This commit is contained in:
Jesse Bounds
2016-09-01 16:49:30 -07:00
committed by GitHub
parent 5e8e00561d
commit 0c4e51adf8

View File

@@ -23,6 +23,10 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu
@interface MGLTestCalloutView: UIView<MGLCalloutView>
@property (nonatomic) BOOL didCallDismissCalloutAnimated;
@property (nonatomic, strong) id <MGLAnnotation> representedObject;
@property (nonatomic, strong) UIView *leftAccessoryView;
@property (nonatomic, strong) UIView *rightAccessoryView;
@property (nonatomic, weak) id<MGLCalloutViewDelegate> delegate;
@end
@implementation MGLTestCalloutView
@@ -32,6 +36,8 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu
_didCallDismissCalloutAnimated = YES;
}
- (void)presentCalloutFromRect:(CGRect)rect inView:(UIView *)view constrainedToView:(UIView *)constrainedView animated:(BOOL)animated { }
@end
@interface MGLAnnotationViewTests : XCTestCase <MGLMapViewDelegate>