Fixed formatting of MPPPoseLandmarkerTests.mm
This commit is contained in:
parent
972e3d81c0
commit
447f9cc452
|
@ -75,7 +75,8 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testDetectWithOptionsSucceeds {
|
- (void)testDetectWithOptionsSucceeds {
|
||||||
MPPPoseLandmarkerOptions *options = [self poseLandmarkerOptionsWithModelFileInfo:kPoseLandmarkerBundleAssetFileInfo];
|
MPPPoseLandmarkerOptions *options =
|
||||||
|
[self poseLandmarkerOptionsWithModelFileInfo:kPoseLandmarkerBundleAssetFileInfo];
|
||||||
MPPPoseLandmarker *poseLandmarker = [self createPoseLandmarkerWithOptionsSucceeds:options];
|
MPPPoseLandmarker *poseLandmarker = [self createPoseLandmarkerWithOptionsSucceeds:options];
|
||||||
|
|
||||||
[self assertResultsOfDetectInImageWithFileInfo:kPoseImageFileInfo
|
[self assertResultsOfDetectInImageWithFileInfo:kPoseImageFileInfo
|
||||||
|
@ -85,13 +86,14 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testDetectWithEmptyResultsSucceeds {
|
- (void)testDetectWithEmptyResultsSucceeds {
|
||||||
MPPPoseLandmarkerOptions *options = [self poseLandmarkerOptionsWithModelFileInfo:kPoseLandmarkerBundleAssetFileInfo];
|
MPPPoseLandmarkerOptions *options =
|
||||||
|
[self poseLandmarkerOptionsWithModelFileInfo:kPoseLandmarkerBundleAssetFileInfo];
|
||||||
MPPPoseLandmarker *poseLandmarker = [self createPoseLandmarkerWithOptionsSucceeds:options];
|
MPPPoseLandmarker *poseLandmarker = [self createPoseLandmarkerWithOptionsSucceeds:options];
|
||||||
|
|
||||||
[self assertResultsOfDetectInImageWithFileInfo:kNoPoseImageFileInfo
|
[self
|
||||||
usingPoseLandmarker:poseLandmarker
|
assertResultsOfDetectInImageWithFileInfo:kNoPoseImageFileInfo
|
||||||
approximatelyEqualsPoseLandmarkerResult:[MPPPoseLandmarkerTests
|
usingPoseLandmarker:poseLandmarker
|
||||||
emptyPoseLandmarkerResult]];
|
approximatelyEqualsPoseLandmarkerResult:[MPPPoseLandmarkerTests emptyPoseLandmarkerResult]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testCreatePoseLandmarkerFailsWithDelegateInNonLiveStreamMode {
|
- (void)testCreatePoseLandmarkerFailsWithDelegateInNonLiveStreamMode {
|
||||||
|
@ -432,7 +434,6 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
// Expects to have the same number of poses detected.
|
// Expects to have the same number of poses detected.
|
||||||
[self assertMultiPoseLandmarks:poseLandmarkerResult.landmarks
|
[self assertMultiPoseLandmarks:poseLandmarkerResult.landmarks
|
||||||
areApproximatelyEqualToExpectedMultiPoseLandmarks:expectedPoseLandmarkerResult.landmarks];
|
areApproximatelyEqualToExpectedMultiPoseLandmarks:expectedPoseLandmarkerResult.landmarks];
|
||||||
|
|
||||||
|
|
||||||
[self assertLandmarksAreVisibleAndPresentInPoseLandmarkerResult:poseLandmarkerResult];
|
[self assertLandmarksAreVisibleAndPresentInPoseLandmarkerResult:poseLandmarkerResult];
|
||||||
}
|
}
|
||||||
|
@ -440,8 +441,8 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
- (void)assertMultiPoseLandmarks:(NSArray<NSArray<MPPNormalizedLandmark *> *> *)multiPoseLandmarks
|
- (void)assertMultiPoseLandmarks:(NSArray<NSArray<MPPNormalizedLandmark *> *> *)multiPoseLandmarks
|
||||||
areApproximatelyEqualToExpectedMultiPoseLandmarks:
|
areApproximatelyEqualToExpectedMultiPoseLandmarks:
|
||||||
(NSArray<NSArray<MPPNormalizedLandmark *> *> *)expectedMultiPoseLandmarks {
|
(NSArray<NSArray<MPPNormalizedLandmark *> *> *)expectedMultiPoseLandmarks {
|
||||||
XCTAssertEqual(multiPoseLandmarks.count, expectedMultiPoseLandmarks.count);
|
XCTAssertEqual(multiPoseLandmarks.count, expectedMultiPoseLandmarks.count);
|
||||||
|
|
||||||
if (multiPoseLandmarks.count == 0) {
|
if (multiPoseLandmarks.count == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -475,4 +476,4 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user