Files
openclaw/apps/macos/Tests/OpenClawIPCTests/VoiceWakeOverlayTests.swift
2026-03-08 13:22:46 +00:00

22 lines
717 B
Swift

import Foundation
import Testing
@testable import OpenClaw
struct VoiceWakeOverlayTests {
@Test func `guard token drops when no active`() {
let outcome = VoiceWakeOverlayController.evaluateToken(active: nil, incoming: UUID())
#expect(outcome == .dropNoActive)
}
@Test func `guard token accepts matching`() {
let token = UUID()
let outcome = VoiceWakeOverlayController.evaluateToken(active: token, incoming: token)
#expect(outcome == .accept)
}
@Test func `guard token drops mismatch without dismissing`() {
let outcome = VoiceWakeOverlayController.evaluateToken(active: UUID(), incoming: UUID())
#expect(outcome == .dropMismatch)
}
}