aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-10-03 09:33:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-03 09:33:28 +0000
commit332f43275ddbefa5f2376381f6f8d6115d69b3b4 (patch)
treec3d012f915587f7bc3fee31d722d658eeac81992 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
parentd415747a27514281e9040bcd9c8cb135a0ca2f48 (diff)
parentb28d1cc48794019e63b95b197a6b9cd3fe64275c (diff)
downloadlatinime-332f43275ddbefa5f2376381f6f8d6115d69b3b4.tar.gz
latinime-332f43275ddbefa5f2376381f6f8d6115d69b3b4.tar.xz
latinime-332f43275ddbefa5f2376381f6f8d6115d69b3b4.zip
Merge "Fix a behavior change in dicttool"
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java12
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);