Skip to content

Commit 0d6904e

Browse files
committed
ci: check if exposure is supported before
1 parent 7db1886 commit 0d6904e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

camposer/src/androidTest/java/com/ujizin/camposer/ExposureCompensationTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ internal class ExposureCompensationTest: CameraTest() {
2727
exposureCompensation.value = cameraState.minExposure
2828

2929
runOnIdle {
30+
if (!cameraState.isExposureSupported) return@runOnIdle
31+
3032
assertEquals(cameraState.minExposure, currentExposure)
3133
assertEquals(exposureCompensation.value, currentExposure)
3234
}
@@ -40,6 +42,7 @@ internal class ExposureCompensationTest: CameraTest() {
4042

4143
runOnIdle {
4244
if (!cameraState.isExposureSupported) return@runOnIdle
45+
4346
assertEquals(cameraState.maxExposure, currentExposure)
4447
assertEquals(exposureCompensation.value, currentExposure)
4548
}
@@ -53,6 +56,8 @@ internal class ExposureCompensationTest: CameraTest() {
5356
exposureCompensation.value = Int.MAX_VALUE
5457

5558
runOnIdle {
59+
if (!cameraState.isExposureSupported) return@runOnIdle
60+
5661
assertNotEquals(cameraState.maxExposure, currentExposure)
5762
assertNotEquals(exposureCompensation.value, currentExposure)
5863
assertEquals(cameraState.initialExposure, currentExposure)

0 commit comments

Comments
 (0)