diff options
author | 2014-08-29 19:19:09 +0000 | |
---|---|---|
committer | 2014-08-29 19:19:09 +0000 | |
commit | 2b44ba116a8d0926f7b4f5cae1b0306ac5e04a5c (patch) | |
tree | 1ab8c3bb825f1de890c1e9f1673782b31f36f905 /tests/src | |
parent | 607081c40c9b4dfa12b309e3e5bdaaa7dec3b498 (diff) | |
parent | 78bb2dd945a013f230396f3ce9c122a20fec21cf (diff) | |
download | latinime-2b44ba116a8d0926f7b4f5cae1b0306ac5e04a5c.tar.gz latinime-2b44ba116a8d0926f7b4f5cae1b0306ac5e04a5c.tar.xz latinime-2b44ba116a8d0926f7b4f5cae1b0306ac5e04a5c.zip |
am 78bb2dd9: am 3bd8eee3: am 4e28a6a8: Fix an IOOB exception
* commit '78bb2dd945a013f230396f3ce9c122a20fec21cf':
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()); } } |