diff options
author | 2014-08-29 19:07:03 +0000 | |
---|---|---|
committer | 2014-08-29 19:07:03 +0000 | |
commit | 78bb2dd945a013f230396f3ce9c122a20fec21cf (patch) | |
tree | d9aaa5086cf24eab8513f27abaf27c6103deeca8 /tests/src | |
parent | f9af39e53edbf6c466c46d2a3111e28f72acaf34 (diff) | |
parent | 3bd8eee3e8c3e89539578a4231661819de65c804 (diff) | |
download | latinime-78bb2dd945a013f230396f3ce9c122a20fec21cf.tar.gz latinime-78bb2dd945a013f230396f3ce9c122a20fec21cf.tar.xz latinime-78bb2dd945a013f230396f3ce9c122a20fec21cf.zip |
am 3bd8eee3: am 4e28a6a8: Fix an IOOB exception
* commit '3bd8eee3e8c3e89539578a4231661819de65c804':
Fix an IOOB exception
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java index c28d08cdb..869c550e0 100644 --- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java +++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java @@ -148,5 +148,15 @@ public class SuggestedWordsTests extends AndroidTestCase { // Make sure getTypedWordInfoOrNull() returns null. assertNull(SuggestedWords.EMPTY.getTypedWordInfoOrNull()); + + final SuggestedWords emptySuggestedWords = new SuggestedWords( + new ArrayList<SuggestedWordInfo>(), null /* rawSuggestions */, + false /* typedWordValid */, + false /* willAutoCorrect */, + false /* isObsoleteSuggestions */, + SuggestedWords.INPUT_STYLE_NONE); + assertNull(emptySuggestedWords.getTypedWordInfoOrNull()); + + assertNull(SuggestedWords.EMPTY.getTypedWordInfoOrNull()); } } |