Updated MPPGestureRecognizer tests to use generics
This commit is contained in:
parent
32195e6a83
commit
1496b7c2d4
|
@ -178,7 +178,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
|
|
||||||
#pragma mark File
|
#pragma mark File
|
||||||
|
|
||||||
+ (NSString *)filePathWithFileInfo:(NSDictionary *)fileInfo {
|
+ (NSString *)filePathWithFileInfo:(ResourceFileInfo *)fileInfo {
|
||||||
NSString *filePath = [MPPGestureRecognizerTests filePathWithName:fileInfo[@"name"]
|
NSString *filePath = [MPPGestureRecognizerTests filePathWithName:fileInfo[@"name"]
|
||||||
extension:fileInfo[@"type"]];
|
extension:fileInfo[@"type"]];
|
||||||
return filePath;
|
return filePath;
|
||||||
|
@ -193,7 +193,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
#pragma mark Gesture Recognizer Initializers
|
#pragma mark Gesture Recognizer Initializers
|
||||||
|
|
||||||
- (MPPGestureRecognizerOptions *)gestureRecognizerOptionsWithModelFileInfo:
|
- (MPPGestureRecognizerOptions *)gestureRecognizerOptionsWithModelFileInfo:
|
||||||
(NSDictionary *)modelFileInfo {
|
(ResourceFileInfo *)modelFileInfo {
|
||||||
NSString *modelPath = [MPPGestureRecognizerTests filePathWithFileInfo:modelFileInfo];
|
NSString *modelPath = [MPPGestureRecognizerTests filePathWithFileInfo:modelFileInfo];
|
||||||
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
||||||
[[MPPGestureRecognizerOptions alloc] init];
|
[[MPPGestureRecognizerOptions alloc] init];
|
||||||
|
@ -224,7 +224,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
|
|
||||||
#pragma mark Assert Gesture Recognizer Results
|
#pragma mark Assert Gesture Recognizer Results
|
||||||
|
|
||||||
- (MPPImage *)imageWithFileInfo:(NSDictionary *)fileInfo {
|
- (MPPImage *)imageWithFileInfo:(ResourceFileInfo *)fileInfo {
|
||||||
MPPImage *image = [MPPImage imageFromBundleWithClass:[MPPGestureRecognizerTests class]
|
MPPImage *image = [MPPImage imageFromBundleWithClass:[MPPGestureRecognizerTests class]
|
||||||
fileName:fileInfo[@"name"]
|
fileName:fileInfo[@"name"]
|
||||||
ofType:fileInfo[@"type"]];
|
ofType:fileInfo[@"type"]];
|
||||||
|
@ -233,7 +233,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MPPImage *)imageWithFileInfo:(NSDictionary *)fileInfo
|
- (MPPImage *)imageWithFileInfo:(ResourceFileInfo *)fileInfo
|
||||||
orientation:(UIImageOrientation)orientation {
|
orientation:(UIImageOrientation)orientation {
|
||||||
MPPImage *image = [MPPImage imageFromBundleWithClass:[MPPGestureRecognizerTests class]
|
MPPImage *image = [MPPImage imageFromBundleWithClass:[MPPGestureRecognizerTests class]
|
||||||
fileName:fileInfo[@"name"]
|
fileName:fileInfo[@"name"]
|
||||||
|
@ -244,7 +244,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MPPGestureRecognizerResult *)recognizeImageWithFileInfo:(NSDictionary *)imageFileInfo
|
- (MPPGestureRecognizerResult *)recognizeImageWithFileInfo:(ResourceFileInfo *)imageFileInfo
|
||||||
usingGestureRecognizer:
|
usingGestureRecognizer:
|
||||||
(MPPGestureRecognizer *)gestureRecognizer {
|
(MPPGestureRecognizer *)gestureRecognizer {
|
||||||
MPPImage *mppImage = [self imageWithFileInfo:imageFileInfo];
|
MPPImage *mppImage = [self imageWithFileInfo:imageFileInfo];
|
||||||
|
@ -255,7 +255,7 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
return gestureRecognizerResult;
|
return gestureRecognizerResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)assertResultsOfRecognizeImageWithFileInfo:(NSDictionary *)fileInfo
|
- (void)assertResultsOfRecognizeImageWithFileInfo:(ResourceFileInfo *)fileInfo
|
||||||
usingGestureRecognizer:(MPPGestureRecognizer *)gestureRecognizer
|
usingGestureRecognizer:(MPPGestureRecognizer *)gestureRecognizer
|
||||||
approximatelyEqualsGestureRecognizerResult:
|
approximatelyEqualsGestureRecognizerResult:
|
||||||
(MPPGestureRecognizerResult *)expectedGestureRecognizerResult {
|
(MPPGestureRecognizerResult *)expectedGestureRecognizerResult {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user