mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am d5335d93: Merge "Fix the RichInputConnectionAndTextRangeTests"
* commit 'd5335d939a5551326206afb684d0c40ef352eea5': Fix the RichInputConnectionAndTextRangeTests
This commit is contained in:
commit
c17cc42c02
@ -206,10 +206,14 @@ public class RichInputConnectionAndTextRangeTests extends AndroidTestCase {
|
|||||||
"abc def .", mSpacingAndPunctuations, 1), NgramContext.BEGINNING_OF_SENTENCE);
|
"abc def .", mSpacingAndPunctuations, 1), NgramContext.BEGINNING_OF_SENTENCE);
|
||||||
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
||||||
"abc, def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
|
"abc, def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
|
||||||
|
// question mark is treated as the end of the sentence. Hence, beginning of the
|
||||||
|
// sentence is expected.
|
||||||
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
||||||
"abc? def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
|
"abc? def", mSpacingAndPunctuations, 2), NgramContext.BEGINNING_OF_SENTENCE);
|
||||||
|
// Exclamation mark is treated as the end of the sentence. Hence, beginning of the
|
||||||
|
// sentence is expected.
|
||||||
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
||||||
"abc! def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
|
"abc! def", mSpacingAndPunctuations, 2), NgramContext.BEGINNING_OF_SENTENCE);
|
||||||
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
|
||||||
"abc 'def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
|
"abc 'def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user