diff options
author | 2014-06-26 04:56:08 +0000 | |
---|---|---|
committer | 2014-06-24 01:52:26 +0000 | |
commit | 520765491cbfcb8d2e66ee5c492a66eb8a726a74 (patch) | |
tree | c3d39aeea7c2047afe70e3889c06660cce1e9fd2 /tests/src | |
parent | 5961f2dfaca123e8e6f2fab33fb9d23d8b4c98fc (diff) | |
parent | 0aef59746c6dd32ea3e3ed0d25b5fbc33e4605d8 (diff) | |
download | latinime-520765491cbfcb8d2e66ee5c492a66eb8a726a74.tar.gz latinime-520765491cbfcb8d2e66ee5c492a66eb8a726a74.tar.xz latinime-520765491cbfcb8d2e66ee5c492a66eb8a726a74.zip |
Merge "Make Beginning-of-Sentence prediction require two exposures."
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index 2709ecba6..0552c221e 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -517,15 +517,21 @@ public class InputLogicTests extends InputTestsBase { suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null); } - public void testNoPredictionsAfterPeriod() { + public void testPredictionsAfterPeriod() { mLatinIME.clearPersonalizedDictionariesForTest(); final String WORD_TO_TYPE = "Barack. "; type(WORD_TO_TYPE); sleep(DELAY_TO_WAIT_FOR_PREDICTIONS); runMessages(); - // Test the first prediction is not displayed - final SuggestedWords suggestedWords = mLatinIME.getSuggestedWordsForTest(); - assertEquals("no prediction after period", 0, suggestedWords.size()); + SuggestedWords suggestedWords = mLatinIME.getSuggestedWordsForTest(); + assertEquals("No prediction after period after inputting once.", 0, suggestedWords.size()); + + type(WORD_TO_TYPE); + sleep(DELAY_TO_WAIT_FOR_PREDICTIONS); + runMessages(); + suggestedWords = mLatinIME.getSuggestedWordsForTest(); + assertEquals("Beginning-of-Sentence prediction after inputting 2 times.", "Barack", + suggestedWords.size() > 0 ? suggestedWords.getWord(0) : null); } public void testPredictionsAfterRecorrection() { |