Files
bot/apps/macos/Tests/OpenClawIPCTests/AudioInputDeviceObserverTests.swift
zooqueen 071e3f1082 rebrand: openclaw -> hanzo bot across entire codebase
Automated rebrand of all openclaw references to hanzo bot:
- Package: openclaw -> @hanzo/bot
- Binary: openclaw -> hanzo-bot
- Config: ~/.openclaw -> ~/.hanzo/bot
- Docker: ghcr.io/hanzoai/bot
- Env vars: OPENCLAW_* -> BOT_*
- Bundle IDs: ai.hanzo.bot.*
- Product name: Hanzo Bot
2026-03-19 13:52:32 -07:00

22 lines
1011 B
Swift

import Foundation
import Testing
@testable import Hanzo Bot
struct AudioInputDeviceObserverTests {
@Test func `has usable default input device returns bool`() {
// 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 `has usable default input device consistent with components`() {
// 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)
}
}