diff options
author | 2012-04-11 21:42:22 -0700 | |
---|---|---|
committer | 2012-04-16 16:52:25 -0700 | |
commit | 9bfb6202154e06d7156f2f374dd9359f1be4eb68 (patch) | |
tree | 55597afdc782b7a545da9b856488c86524e529fd /tests/src/com/android/inputmethod/latin/InputLogicTests.java | |
parent | 473a3dd66952711d76e6d3e74292c0d6c7fa38d2 (diff) | |
download | latinime-9bfb6202154e06d7156f2f374dd9359f1be4eb68.tar.gz latinime-9bfb6202154e06d7156f2f374dd9359f1be4eb68.tar.xz latinime-9bfb6202154e06d7156f2f374dd9359f1be4eb68.zip |
add logPoint for manual correction (inc touch pos)
Bug: 6188932
Change-Id: Ibcc4901bcfab6632ee4c59cb58d35452218a288d
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index 11eb6ab19..6c3cb16c7 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -30,7 +30,7 @@ public class InputLogicTests extends InputTestsBase { final String WORD_TO_TYPE = "this"; final String EXPECTED_RESULT = "this"; type(WORD_TO_TYPE); - mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE); + pickSuggestionManually(0, WORD_TO_TYPE); mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); type(Keyboard.CODE_DELETE); assertEquals("press suggestion then backspace", EXPECTED_RESULT, @@ -44,7 +44,7 @@ public class InputLogicTests extends InputTestsBase { type(WORD_TO_TYPE); // Choose the auto-correction, which is always in position 0. For "tgis", the // auto-correction should be "this". - mLatinIME.pickSuggestionManually(0, WORD_TO_PICK); + pickSuggestionManually(0, WORD_TO_PICK); mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); assertEquals("pick typed word over auto-correction then backspace", WORD_TO_PICK, mTextView.getText().toString()); @@ -59,7 +59,7 @@ public class InputLogicTests extends InputTestsBase { type(WORD_TO_TYPE); // Choose the typed word, which should be in position 1 (because position 0 should // be occupied by the "this" auto-correction, as checked by testAutoCorrect()) - mLatinIME.pickSuggestionManually(1, WORD_TO_TYPE); + pickSuggestionManually(1, WORD_TO_TYPE); mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); assertEquals("pick typed word over auto-correction then backspace", WORD_TO_TYPE, mTextView.getText().toString()); @@ -75,7 +75,7 @@ public class InputLogicTests extends InputTestsBase { type(WORD_TO_TYPE); // Choose the second suggestion, which should be in position 2 and should be "thus" // when "tgis is typed. - mLatinIME.pickSuggestionManually(2, WORD_TO_PICK); + pickSuggestionManually(2, WORD_TO_PICK); mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); assertEquals("pick different suggestion then backspace", WORD_TO_PICK, mTextView.getText().toString()); @@ -171,7 +171,7 @@ public class InputLogicTests extends InputTestsBase { final String WORD_TO_TYPE = "this"; final String EXPECTED_RESULT = WORD_TO_TYPE; type(WORD_TO_TYPE); - mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE); + pickSuggestionManually(0, WORD_TO_TYPE); assertEquals("no space after manual pick", EXPECTED_RESULT, mTextView.getText().toString()); } @@ -181,7 +181,7 @@ public class InputLogicTests extends InputTestsBase { final String WORD2_TO_TYPE = "is"; final String EXPECTED_RESULT = "this is"; type(WORD1_TO_TYPE); - mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE); + pickSuggestionManually(0, WORD1_TO_TYPE); type(WORD2_TO_TYPE); assertEquals("manual pick then type", EXPECTED_RESULT, mTextView.getText().toString()); } @@ -191,7 +191,7 @@ public class InputLogicTests extends InputTestsBase { final String WORD2_TO_TYPE = "!"; final String EXPECTED_RESULT = "this!"; type(WORD1_TO_TYPE); - mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE); + pickSuggestionManually(0, WORD1_TO_TYPE); type(WORD2_TO_TYPE); assertEquals("manual pick then separator", EXPECTED_RESULT, mTextView.getText().toString()); } @@ -201,7 +201,7 @@ public class InputLogicTests extends InputTestsBase { final String WORD2_TO_TYPE = " is"; final String EXPECTED_RESULT = "this is"; type(WORD1_TO_TYPE); - mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE); + pickSuggestionManually(0, WORD1_TO_TYPE); type(WORD2_TO_TYPE); assertEquals("manual pick then space then type", EXPECTED_RESULT, mTextView.getText().toString()); @@ -212,11 +212,11 @@ public class InputLogicTests extends InputTestsBase { final String WORD2_TO_PICK = "is"; final String EXPECTED_RESULT = "this is"; type(WORD1_TO_TYPE); - mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE); + pickSuggestionManually(0, WORD1_TO_TYPE); // Here we fake picking a word through bigram prediction. This test is taking // advantage of the fact that Latin IME blindly trusts the caller of #pickSuggestionManually // to actually pass the right string. - mLatinIME.pickSuggestionManually(1, WORD2_TO_PICK); + pickSuggestionManually(1, WORD2_TO_PICK); assertEquals("manual pick then manual pick", EXPECTED_RESULT, mTextView.getText().toString()); } |