diff options
author | 2013-12-02 20:11:19 +0900 | |
---|---|---|
committer | 2013-12-02 21:59:56 +0900 | |
commit | e717f64659c3d8cc9bfa2b507cee11df66ad6fbb (patch) | |
tree | 436546187253723d3a02e6497191581fb360426e /tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java | |
parent | 5fa4ad6a85e41989d8bb0e2b876324755330b010 (diff) | |
download | latinime-e717f64659c3d8cc9bfa2b507cee11df66ad6fbb.tar.gz latinime-e717f64659c3d8cc9bfa2b507cee11df66ad6fbb.tar.xz latinime-e717f64659c3d8cc9bfa2b507cee11df66ad6fbb.zip |
Purge Ver3 dictionary writing in native code.
Bug: 11073222
Change-Id: Iccedd618970b270a1e4178cfb178cd87c8208f3d
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java index 140ab63b0..5b888ab2c 100644 --- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java +++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java @@ -74,9 +74,7 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase { private File createEmptyDictionaryAndGetFile(final String dictId, final int formatVersion) throws IOException { - if (formatVersion == 3) { - return createEmptyVer3DictionaryAndGetFile(dictId); - } else if (formatVersion == 4) { + if (formatVersion == 4) { return createEmptyVer4DictionaryAndGetFile(dictId); } else { throw new IOException("Dictionary format version " + formatVersion @@ -102,26 +100,7 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase { } } - private File createEmptyVer3DictionaryAndGetFile(final String dictId) throws IOException { - final File file = File.createTempFile(dictId, TEST_DICT_FILE_EXTENSION, - getContext().getCacheDir()); - file.delete(); - Map<String, String> attributeMap = new HashMap<String, String>(); - attributeMap.put(FormatSpec.FileHeader.SUPPORTS_DYNAMIC_UPDATE_ATTRIBUTE, - FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE); - attributeMap.put(FormatSpec.FileHeader.USES_FORGETTING_CURVE_ATTRIBUTE, - FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE); - if (BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(), 3 /* dictVersion */, - attributeMap)) { - return file; - } else { - throw new IOException( - "Empty dictionary " + file.getAbsolutePath() + " cannot be created."); - } - } - public void testAddValidAndInvalidWords() { - testAddValidAndInvalidWords(3 /* formatVersion */); testAddValidAndInvalidWords(4 /* formatVersion */); } @@ -172,7 +151,6 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase { } public void testDecayingProbability() { - testDecayingProbability(3 /* formatVersion */); testDecayingProbability(4 /* formatVersion */); } @@ -231,7 +209,6 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase { } public void testAddManyUnigramsToDecayingDict() { - testAddManyUnigramsToDecayingDict(3 /* formatVersion */); testAddManyUnigramsToDecayingDict(4 /* formatVersion */); } @@ -288,7 +265,6 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase { } public void testAddManyBigramsToDecayingDict() { - testAddManyBigramsToDecayingDict(3 /* formatVersion */); testAddManyBigramsToDecayingDict(4 /* formatVersion */); } |