aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-24 06:00:50 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-24 06:00:50 -0800
commita6ab1f90657e3cbe91a11e8c64a16212a1070c48 (patch)
tree9214094f6008e98fcca15af9453ca4f232ad55b8 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
parentb7a224636cb9a1356089475ffbd9e45b3084b80d (diff)
parent6e224a236a0a7cd253f74c7ed8b9a8f2eea41600 (diff)
downloadlatinime-a6ab1f90657e3cbe91a11e8c64a16212a1070c48.tar.gz
latinime-a6ab1f90657e3cbe91a11e8c64a16212a1070c48.tar.xz
latinime-a6ab1f90657e3cbe91a11e8c64a16212a1070c48.zip
am 6e224a23: Merge "Correctly read the header of APK-embedded dicts"
* commit '6e224a236a0a7cd253f74c7ed8b9a8f2eea41600': Correctly read the header of APK-embedded dicts
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
index e21e340c2..0ee0fb577 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
@@ -251,7 +251,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
FusionDictionary dict = null;
try {
- final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, bufferType);
+ final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, 0, file.length(),
+ bufferType);
now = System.currentTimeMillis();
dict = dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */);
diff = System.currentTimeMillis() - now;
@@ -413,7 +414,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
long now = -1, diff = -1;
try {
- final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, bufferType);
+ final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, 0, file.length(),
+ bufferType);
now = System.currentTimeMillis();
dictDecoder.readUnigramsAndBigramsBinary(resultWords, resultFreqs, resultBigrams);
diff = System.currentTimeMillis() - now;
@@ -537,7 +539,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
addBigrams(dict, words, bigrams);
timeWritingDictToFile(file, dict, formatOptions);
- final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, DictDecoder.USE_BYTEARRAY);
+ final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, 0, file.length(),
+ DictDecoder.USE_BYTEARRAY);
try {
dictDecoder.openDictBuffer();
} catch (IOException e) {