fix broken tests

This commit is contained in:
Helium314 2024-06-11 22:12:31 +02:00
parent 843b8c44f7
commit b7fa85dcee

View file

@ -635,11 +635,7 @@ class InputLogicTest {
checkConnectionConsistency()
}
private fun getWordAtCursor() = connection.getWordRangeAtCursor(
settingsValues.mSpacingAndPunctuations,
currentScript,
false
)?.mWord
private fun getWordAtCursor() = connection.getWordRangeAtCursor(settingsValues.mSpacingAndPunctuations, currentScript)?.mWord
private fun setCursorPosition(start: Int, end: Int = start, weirdTextField: Boolean = false) {
val ei = EditorInfo()
@ -917,9 +913,16 @@ private val ic = object : InputConnection {
}
return true
}
// implementation is only to work with getTextBeforeCursorAndDetectLaggyConnection
override fun getExtractedText(p0: ExtractedTextRequest?, p1: Int): ExtractedText {
return ExtractedText().also {
it.startOffset = 0
it.selectionStart = selectionStart
it.selectionEnd = selectionEnd
}
}
// implement only when necessary
override fun getCursorCapsMode(p0: Int): Int = TODO("Not yet implemented")
override fun getExtractedText(p0: ExtractedTextRequest?, p1: Int): ExtractedText = TODO("Not yet implemented")
override fun deleteSurroundingTextInCodePoints(p0: Int, p1: Int): Boolean = TODO("Not yet implemented")
override fun commitCompletion(p0: CompletionInfo?): Boolean = TODO("Not yet implemented")
override fun commitCorrection(p0: CorrectionInfo?): Boolean = TODO("Not yet implemented")