diff options
author | 2014-10-03 09:36:16 +0000 | |
---|---|---|
committer | 2014-10-03 09:36:16 +0000 | |
commit | ddaa1764765695214dc3e092dde2ca08af3321fa (patch) | |
tree | fc62852228c4aea3983fe76fe409b8ca8bcff207 /tests/src | |
parent | 13a6a56fe87644b8e56ad8ee88c6395aea0c5d7a (diff) | |
parent | 332f43275ddbefa5f2376381f6f8d6115d69b3b4 (diff) | |
download | latinime-ddaa1764765695214dc3e092dde2ca08af3321fa.tar.gz latinime-ddaa1764765695214dc3e092dde2ca08af3321fa.tar.xz latinime-ddaa1764765695214dc3e092dde2ca08af3321fa.zip |
am 332f4327: Merge "Fix a behavior change in dicttool"
* commit '332f43275ddbefa5f2376381f6f8d6115d69b3b4':
Fix a behavior change in dicttool
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java index 215c9ddc7..201b8bb77 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java @@ -715,11 +715,13 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { } assertTrue(shortcutList.isEmpty()); } - for (final WeightedString bigramTarget : wordProperty.getBigrams()) { - final String word1 = bigramTarget.mWord; - final Pair<String, String> bigram = new Pair<>(word0, word1); - assertTrue(bigramSet.contains(bigram)); - bigramSet.remove(bigram); + if (wordProperty.mHasNgrams) { + for (final WeightedString bigramTarget : wordProperty.getBigrams()) { + final String word1 = bigramTarget.mWord; + final Pair<String, String> bigram = new Pair<>(word0, word1); + assertTrue(bigramSet.contains(bigram)); + bigramSet.remove(bigram); + } } token = result.mNextToken; } while (token != 0); |