2025-12-29 21:10:44 +01:00
|
|
|
import Testing
|
2026-01-04 14:32:47 +00:00
|
|
|
@testable import Clawdbot
|
2025-12-29 21:10:44 +01:00
|
|
|
|
|
|
|
|
@Suite struct CameraControllerErrorTests {
|
|
|
|
|
@Test func errorDescriptionsAreStable() {
|
|
|
|
|
#expect(CameraController.CameraError.cameraUnavailable.errorDescription == "Camera unavailable")
|
|
|
|
|
#expect(CameraController.CameraError.microphoneUnavailable.errorDescription == "Microphone unavailable")
|
2026-01-08 02:36:29 +00:00
|
|
|
#expect(CameraController.CameraError.permissionDenied(kind: "Camera")
|
|
|
|
|
.errorDescription == "Camera permission denied")
|
2025-12-29 21:10:44 +01:00
|
|
|
#expect(CameraController.CameraError.invalidParams("bad").errorDescription == "bad")
|
|
|
|
|
#expect(CameraController.CameraError.captureFailed("nope").errorDescription == "nope")
|
|
|
|
|
#expect(CameraController.CameraError.exportFailed("export").errorDescription == "export")
|
|
|
|
|
}
|
|
|
|
|
}
|