diff options
author | 2013-12-16 14:17:33 +0900 | |
---|---|---|
committer | 2013-12-16 14:32:19 +0900 | |
commit | b868375763de60d1a1ff6fa21b121cc1b61df842 (patch) | |
tree | e909b246d797e1e61bc64770ffba2cfa1bbdd537 /java/src | |
parent | 2c25c7c9e1c98feaa3fc739244badacfa0719576 (diff) | |
download | latinime-b868375763de60d1a1ff6fa21b121cc1b61df842.tar.gz latinime-b868375763de60d1a1ff6fa21b121cc1b61df842.tar.xz latinime-b868375763de60d1a1ff6fa21b121cc1b61df842.zip |
Fix failing tests
- Version 3 is not supported
- Now passing the right string to open v4 dicts. Fix the tests for this.
Change-Id: I7829330c3568a715b96396ba4e4e69c6e17775ab
Diffstat (limited to 'java/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index f23fe4656..2f6f194aa 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -188,7 +188,6 @@ public final class FormatSpec { // us to change the format during development while having testing devices remove // older files with each upgrade, while still having a readable versioning scheme. public static final int VERSION2 = 2; - public static final int VERSION3 = 3; public static final int VERSION4 = 400; static final int MINIMUM_SUPPORTED_VERSION = VERSION2; static final int MAXIMUM_SUPPORTED_VERSION = VERSION4; diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java index 665544228..e5430423d 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java @@ -68,7 +68,7 @@ public class Ver2DictEncoder implements DictEncoder { @Override public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions) throws IOException, UnsupportedFormatException { - if (formatOptions.mVersion > FormatSpec.VERSION3) { + if (formatOptions.mVersion > FormatSpec.VERSION2) { throw new UnsupportedFormatException( "The given format options has wrong version number : " + formatOptions.mVersion); diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java index a746f9945..8eaee4d9f 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java @@ -56,7 +56,8 @@ public class Ver4DictEncoder implements DictEncoder { } if (!BinaryDictionary.createEmptyDictFile(mDictPlacedDir.getAbsolutePath(), FormatSpec.VERSION4, dict.mOptions.mAttributes)) { - throw new IOException("Cannot create dictionary file"); + throw new IOException("Cannot create dictionary file : " + + mDictPlacedDir.getAbsolutePath()); } final BinaryDictionary binaryDict = new BinaryDictionary(mDictPlacedDir.getAbsolutePath(), 0l, mDictPlacedDir.length(), true /* useFullEditDistance */, |