aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2015-03-20 00:41:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-20 00:41:27 +0000
commit7df95c54fa9edd4a9fc9c267b204640299b7bad6 (patch)
tree22dfcb22bddf6902b6f046110314e4fe81c2b2bb /tests/src
parent6c1c337227d101ee92b508b63b1d74293cc2e5c0 (diff)
parentab5912959435c1901e268bc9766090e604f3523d (diff)
downloadlatinime-7df95c54fa9edd4a9fc9c267b204640299b7bad6.tar.gz
latinime-7df95c54fa9edd4a9fc9c267b204640299b7bad6.tar.xz
latinime-7df95c54fa9edd4a9fc9c267b204640299b7bad6.zip
Merge "Add prev words context to the SuggestedWordInfo."
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java3
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java3
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java4
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
index 7bbf965f9..daf412cc3 100644
--- a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
+++ b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
@@ -42,7 +42,8 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase {
* @return a new instance of {@link SuggestedWordInfo}.
*/
private static SuggestedWordInfo createWordInfo(final String word, final int kindAndFlags) {
- return new SuggestedWordInfo(word, 1 /* score */, kindAndFlags, null /* sourceDict */,
+ return new SuggestedWordInfo(word, "" /* prevWordsContext */, 1 /* score */, kindAndFlags,
+ null /* sourceDict */,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */);
}
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index ab4060a86..0d9b36ac0 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -409,7 +409,8 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
}
protected void pickSuggestionManually(final String suggestion) {
- mLatinIME.pickSuggestionManually(new SuggestedWordInfo(suggestion, 1,
+ mLatinIME.pickSuggestionManually(new SuggestedWordInfo(suggestion,
+ "" /* prevWordsContext */, 1 /* score */,
SuggestedWordInfo.KIND_CORRECTION, DICTIONARY_TEST,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */));
diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
index 657cec8d7..d465ce674 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
@@ -37,7 +37,7 @@ public class SuggestedWordsTests extends AndroidTestCase {
private static SuggestedWordInfo createTypedWordInfo(final String word) {
// Use 100 as the frequency because the numerical value does not matter as
// long as it's > 1 and < INT_MAX.
- return new SuggestedWordInfo(word, 100 /* score */,
+ return new SuggestedWordInfo(word, "" /* prevWordsContext */, 100 /* score */,
SuggestedWordInfo.KIND_TYPED,
null /* sourceDict */,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
@@ -52,7 +52,7 @@ public class SuggestedWordsTests extends AndroidTestCase {
* @return a new instance of {@link SuggestedWordInfo}.
*/
private static SuggestedWordInfo createCorrectionWordInfo(final String word) {
- return new SuggestedWordInfo(word, 1 /* score */,
+ return new SuggestedWordInfo(word, "" /* prevWordsContext */, 1 /* score */,
SuggestedWordInfo.KIND_CORRECTION,
null /* sourceDict */,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,