Skip to content

armgit / andee

Public Imported from GitHub
0

Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。

test: reject exit phrases from automatic follow-up

李融a3add9c21151
diff --git a/app/src/test/java/net/kuafuai/andee/asr/VoiceExitCommandTest.kt b/app/src/test/java/net/kuafuai/andee/asr/VoiceExitCommandTest.kt
index 4a29ee8..2661ca1 100644
--- a/app/src/test/java/net/kuafuai/andee/asr/VoiceExitCommandTest.kt
+++ b/app/src/test/java/net/kuafuai/andee/asr/VoiceExitCommandTest.kt
@@ -6,6 +6,14 @@ import org.junit.Assert.assertTrue
import org.junit.Test
class VoiceExitCommandTest {
+ @Test
+ fun `automatic follow-up speech cannot request exit`() {
+ for (text in listOf("Exit Andee", "Take a break", "退出安迪", "休息一下")) {
+ assertFalse(text, VoiceExitCommand.matches(text, userInitiated = false))
+ assertTrue(text, VoiceExitCommand.matches(text, userInitiated = true))
+ }
+ }
+
@Test
fun `recognizes the requested English exit phrases`() {
assertTrue(VoiceExitCommand.matches("Exit Andee"))