Skip to content

Commit 55763cb

Browse files
committed
test: add tests for isWideScreen in Misc.kt
1 parent 689007b commit 55763cb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/src/test/java/helium314/keyboard/latin/InputLogicTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ class InputLogicTest {
5555
private lateinit var latinIME: LatinIME
5656
private val settingsValues get() = Settings.getValues()
5757
private val inputLogic get() = latinIME.mInputLogic
58-
private val connection: RichInputConnection get() = inputLogic.connection
59-
private val composerReader = helium314.keyboard.latin.inputlogic.InputLogic::class.java.getDeclaredField("mWordComposer").apply { isAccessible = true }
58+
private val connection: RichInputConnection get() = inputLogic.mConnection
59+
private val composerReader = InputLogic::class.java.getDeclaredField("mWordComposer").apply { isAccessible = true }
6060
private val composer get() = composerReader.get(inputLogic) as WordComposer
61-
private val spaceStateReader = helium314.keyboard.latin.inputlogic.InputLogic::class.java.getDeclaredField("mSpaceState").apply { isAccessible = true }
61+
private val spaceStateReader = InputLogic::class.java.getDeclaredField("mSpaceState").apply { isAccessible = true }
6262
private val spaceState get() = spaceStateReader.get(inputLogic) as Int
6363
private val beforeComposingReader = RichInputConnection::class.java.getDeclaredField("mCommittedTextBeforeComposingText").apply { isAccessible = true }
6464
private val connectionTextBeforeComposingText get() = (beforeComposingReader.get(connection) as CharSequence).toString()
@@ -755,7 +755,7 @@ class InputLogicTest {
755755

756756
if (currentScript != ScriptUtils.SCRIPT_HANGUL // check fails if hangul combiner merges symbols
757757
&& !(codePoint == Constants.CODE_SPACE && oldBefore.lastOrNull() == ' ') // check fails when 2 spaces are converted into a period
758-
&& !latinIME.mInputLogic.suggestedWords.mWillAutoCorrect // autocorrect obviously creates inconsistencies
758+
&& !latinIME.mInputLogic.mSuggestedWords.mWillAutoCorrect // autocorrect obviously creates inconsistencies
759759
) {
760760
if (phantomSpaceToInsert.isEmpty())
761761
assertEquals(oldBefore + insert, textBeforeCursor)

app/src/test/java/helium314/keyboard/latin/SuggestTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import kotlin.test.assertEquals
3939
])
4040
class SuggestTest {
4141
private lateinit var latinIME: LatinIME
42-
private val suggest get() = latinIME.mInputLogic.suggest
42+
private val suggest get() = latinIME.mInputLogic.mSuggest
4343

4444
// values taken from the string array auto_correction_threshold_mode_indexes
4545
private val thresholdModest = 0.185f

0 commit comments

Comments
 (0)