mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 82e87f4f: Merge "Fix: NPE in unit test."
* commit '82e87f4f7fee9e93ff908c1117698c2add460aec': Fix: NPE in unit test.
This commit is contained in:
commit
829e3a6b00
@ -1237,6 +1237,7 @@ public class BinaryDictionaryTests extends AndroidTestCase {
|
|||||||
wordSet.remove(word0);
|
wordSet.remove(word0);
|
||||||
final HashSet<String> bigramWord1s = bigrams.get(word0);
|
final HashSet<String> bigramWord1s = bigrams.get(word0);
|
||||||
// TODO: Support ngram.
|
// TODO: Support ngram.
|
||||||
|
if (wordProperty.mHasNgrams) {
|
||||||
for (final WeightedString bigramTarget : wordProperty.getBigrams()) {
|
for (final WeightedString bigramTarget : wordProperty.getBigrams()) {
|
||||||
final String word1 = bigramTarget.mWord;
|
final String word1 = bigramTarget.mWord;
|
||||||
assertTrue(bigramWord1s.contains(word1));
|
assertTrue(bigramWord1s.contains(word1));
|
||||||
@ -1247,6 +1248,7 @@ public class BinaryDictionaryTests extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
bigramSet.remove(bigram);
|
bigramSet.remove(bigram);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
token = result.mNextToken;
|
token = result.mNextToken;
|
||||||
} while (token != 0);
|
} while (token != 0);
|
||||||
assertTrue(wordSet.isEmpty());
|
assertTrue(wordSet.isEmpty());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user