diff options
author | 2013-08-22 22:43:20 +0900 | |
---|---|---|
committer | 2013-08-23 20:29:25 +0900 | |
commit | e9a10ff0f026b5ec458f116afc7a75806574cbcd (patch) | |
tree | b50ff7fc7e7b4a71db9410bfea829905f00817fb /tools/dicttool/tests | |
parent | b64157bf4720dfc2aa40ad8e6806459012f81082 (diff) | |
download | latinime-e9a10ff0f026b5ec458f116afc7a75806574cbcd.tar.gz latinime-e9a10ff0f026b5ec458f116afc7a75806574cbcd.tar.xz latinime-e9a10ff0f026b5ec458f116afc7a75806574cbcd.zip |
Add DictDecoder.readDictionaryBinary.
Bug: 10434720
Change-Id: I14690a6e0f922ed1bab3a4b6c9a457ae84d4c1a4
Diffstat (limited to 'tools/dicttool/tests')
-rw-r--r-- | tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java index 2b2661a0c..47e220617 100644 --- a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java +++ b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java @@ -16,7 +16,7 @@ package com.android.inputmethod.latin.dicttool; -import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils; +import com.android.inputmethod.latin.makedict.DictDecoder; import com.android.inputmethod.latin.makedict.DictEncoder; import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.makedict.FusionDictionary; @@ -69,10 +69,8 @@ public class BinaryDictOffdeviceUtilsTests extends TestCase { assertEquals("Wrong decode spec", BinaryDictOffdeviceUtils.COMPRESSION, step); } assertEquals("Wrong decode spec", 3, decodeSpec.mDecoderSpec.size()); - final Ver3DictDecoder dictDecoder = new Ver3DictDecoder(decodeSpec.mFile); - dictDecoder.openDictBuffer( - new Ver3DictDecoder.DictionaryBufferFromReadOnlyByteBufferFactory()); - final FusionDictionary resultDict = BinaryDictDecoderUtils.readDictionaryBinary(dictDecoder, + final DictDecoder dictDecoder = new Ver3DictDecoder(decodeSpec.mFile); + final FusionDictionary resultDict = dictDecoder.readDictionaryBinary( null /* dict : an optional dictionary to add words to, or null */); assertEquals("Dictionary can't be read back correctly", FusionDictionary.findWordInTree(resultDict.mRootNodeArray, "foo").getFrequency(), |