diff options
| author | Mohammadinamul Sheik <inamul@google.com> | 2015-03-18 18:44:56 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-18 18:44:57 +0000 |
| commit | d5335d939a5551326206afb684d0c40ef352eea5 (patch) | |
| tree | 1c470f5df8086b4558265b0cd964a840db4b5b89 /tests/src/com/android | |
| parent | d4ce5e944b849cbae65aa62f99bf2ee0796fbff3 (diff) | |
| parent | 25433d7a0b9ed9a60dc70e5dd34ad329ef21b036 (diff) | |
| download | android_packages_inputmethods_LatinIME-d5335d939a5551326206afb684d0c40ef352eea5.tar.gz android_packages_inputmethods_LatinIME-d5335d939a5551326206afb684d0c40ef352eea5.tar.bz2 android_packages_inputmethods_LatinIME-d5335d939a5551326206afb684d0c40ef352eea5.zip | |
Merge "Fix the RichInputConnectionAndTextRangeTests"
Diffstat (limited to 'tests/src/com/android')
| -rw-r--r-- | tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java index 8614ccc0e..08779b9d3 100644 --- a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java +++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java @@ -206,10 +206,14 @@ public class RichInputConnectionAndTextRangeTests extends AndroidTestCase { "abc def .", mSpacingAndPunctuations, 1), NgramContext.BEGINNING_OF_SENTENCE); assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord( "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( - "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( - "abc! def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO); + "abc! def", mSpacingAndPunctuations, 2), NgramContext.BEGINNING_OF_SENTENCE); assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord( "abc 'def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO); } |
