mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Merged 3580 upstream commits from openclaw/main through a bridge branch that applied the openclaw→hanzo-bot rebrand before merging. Key upstream additions: - Android device diagnostics and notification actions - Device-auth v2 migration improvements - Docker CLI packaging fixes - Ollama discovery log demotion - Channel health monitoring - Slack native streaming - Linq iMessage channel - Gemini OAuth and FTS improvements - Inbound sender metadata - Daemon PATH improvements - Canvas host and onboarding enhancements - Security hardening (session files, exec allowlist)
22 lines
995 B
Swift
22 lines
995 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import Bot
|
|
|
|
@Suite struct AudioInputDeviceObserverTests {
|
|
@Test func hasUsableDefaultInputDeviceReturnsBool() {
|
|
// Smoke test: verifies the composition logic runs without crashing.
|
|
// Actual result depends on whether the host has an audio input device.
|
|
let result = AudioInputDeviceObserver.hasUsableDefaultInputDevice()
|
|
_ = result // suppress unused-variable warning; the assertion is "no crash"
|
|
}
|
|
|
|
@Test func hasUsableDefaultInputDeviceConsistentWithComponents() {
|
|
// When no default UID exists, the method must return false.
|
|
// When a default UID exists, the result must match alive-set membership.
|
|
let uid = AudioInputDeviceObserver.defaultInputDeviceUID()
|
|
let alive = AudioInputDeviceObserver.aliveInputDeviceUIDs()
|
|
let expected = uid.map { alive.contains($0) } ?? false
|
|
#expect(AudioInputDeviceObserver.hasUsableDefaultInputDevice() == expected)
|
|
}
|
|
}
|