@@ -19,68 +19,60 @@ final class CameraPropertiesTests: XCTestCase {
1919 func testGetAVCaptureFlashModeForPigeonFlashMode( ) {
2020 XCTAssertEqual (
2121 AVCaptureDevice . FlashMode. off,
22- FCPGetAVCaptureFlashModeForPigeonFlashMode ( FCPPlatformFlashMode . off) )
22+ getAVCaptureFlashMode ( for : . off) )
2323 XCTAssertEqual (
2424 AVCaptureDevice . FlashMode. auto,
25- FCPGetAVCaptureFlashModeForPigeonFlashMode ( FCPPlatformFlashMode . auto) )
25+ getAVCaptureFlashMode ( for : . auto) )
2626 XCTAssertEqual (
2727 AVCaptureDevice . FlashMode. on,
28- FCPGetAVCaptureFlashModeForPigeonFlashMode ( FCPPlatformFlashMode . always) )
29-
30- // TODO(FirentisTFW): Migrate implementation to throw Swift error in this case.
31- let exception = ExceptionCatcher . catchException {
32- _ = FCPGetAVCaptureFlashModeForPigeonFlashMode ( . torch)
33- }
34- XCTAssertNotNil ( exception)
28+ getAVCaptureFlashMode ( for: . always) )
3529 }
3630
3731 // MARK: - Video Format Tests
3832
3933 func testGetPixelFormatForPigeonFormat( ) {
4034 XCTAssertEqual (
4135 kCVPixelFormatType_32BGRA,
42- FCPGetPixelFormatForPigeonFormat ( FCPPlatformImageFormatGroup . bgra8888) )
36+ getPixelFormat ( for : . bgra8888) )
4337 XCTAssertEqual (
4438 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange,
45- FCPGetPixelFormatForPigeonFormat ( FCPPlatformImageFormatGroup . yuv420) )
39+ getPixelFormat ( for : . yuv420) )
4640 }
4741
4842 // MARK: - Device Orientation Tests
4943
5044 func testGetUIDeviceOrientationForPigeonDeviceOrientation( ) {
5145 XCTAssertEqual (
5246 UIDeviceOrientation . portraitUpsideDown,
53- FCPGetUIDeviceOrientationForPigeonDeviceOrientation ( FCPPlatformDeviceOrientation . portraitDown)
47+ getUIDeviceOrientation ( for : . portraitDown)
5448 )
5549 XCTAssertEqual (
5650 UIDeviceOrientation . landscapeLeft,
57- FCPGetUIDeviceOrientationForPigeonDeviceOrientation (
58- FCPPlatformDeviceOrientation . landscapeLeft) )
51+ getUIDeviceOrientation ( for: . landscapeLeft) )
5952 XCTAssertEqual (
6053 UIDeviceOrientation . landscapeRight,
61- FCPGetUIDeviceOrientationForPigeonDeviceOrientation (
62- FCPPlatformDeviceOrientation . landscapeRight) )
54+ getUIDeviceOrientation ( for: . landscapeRight) )
6355 XCTAssertEqual (
6456 UIDeviceOrientation . portrait,
65- FCPGetUIDeviceOrientationForPigeonDeviceOrientation ( FCPPlatformDeviceOrientation . portraitUp) )
57+ getUIDeviceOrientation ( for : . portraitUp) )
6658 }
6759
6860 func testGetPigeonDeviceOrientationForUIDeviceOrientation( ) {
6961 XCTAssertEqual (
7062 FCPPlatformDeviceOrientation . portraitDown,
71- FCPGetPigeonDeviceOrientationForOrientation ( UIDeviceOrientation . portraitUpsideDown) )
63+ getPigeonDeviceOrientation ( for : . portraitUpsideDown) )
7264 XCTAssertEqual (
7365 FCPPlatformDeviceOrientation . landscapeLeft,
74- FCPGetPigeonDeviceOrientationForOrientation ( UIDeviceOrientation . landscapeLeft) )
66+ getPigeonDeviceOrientation ( for : . landscapeLeft) )
7567 XCTAssertEqual (
7668 FCPPlatformDeviceOrientation . landscapeRight,
77- FCPGetPigeonDeviceOrientationForOrientation ( UIDeviceOrientation . landscapeRight) )
69+ getPigeonDeviceOrientation ( for : . landscapeRight) )
7870 XCTAssertEqual (
7971 FCPPlatformDeviceOrientation . portraitUp,
80- FCPGetPigeonDeviceOrientationForOrientation ( UIDeviceOrientation . portrait) )
72+ getPigeonDeviceOrientation ( for : . portrait) )
8173 // Test default case.
8274 XCTAssertEqual (
8375 FCPPlatformDeviceOrientation . portraitUp,
84- FCPGetPigeonDeviceOrientationForOrientation ( UIDeviceOrientation . unknown) )
76+ getPigeonDeviceOrientation ( for : . unknown) )
8577 }
8678}
0 commit comments