aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2015-02-05 13:27:36 -0800
committerMohammadinamul Sheik <inamul@google.com>2015-02-05 13:27:36 -0800
commit0f7d881dc72132dfd75c8b4fe61a69fc5cdcd460 (patch)
tree736c344b8b662983e99f2e71ba4ab65bc8667b60 /tests/src/com
parent608ef4729c26dca2be48eb72f372a278a03ff26d (diff)
downloadlatinime-0f7d881dc72132dfd75c8b4fe61a69fc5cdcd460.tar.gz
latinime-0f7d881dc72132dfd75c8b4fe61a69fc5cdcd460.tar.xz
latinime-0f7d881dc72132dfd75c8b4fe61a69fc5cdcd460.zip
Move decoder specific constants to DecoderSpecificConstants.java
Change-Id: Ie4d325b3152e1e7e424b8b436e222e194e4d9da0
Diffstat (limited to 'tests/src/com')
-rw-r--r--tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java4
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java4
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
index 60d2de18c..a8f0d81af 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
@@ -23,8 +23,8 @@ import android.util.Pair;
import com.android.inputmethod.latin.NgramContext.WordInfo;
import com.android.inputmethod.latin.common.CodePointUtils;
-import com.android.inputmethod.latin.common.Constants;
import com.android.inputmethod.latin.common.FileUtils;
+import com.android.inputmethod.latin.define.DecoderSpecificConstants;
import com.android.inputmethod.latin.makedict.DictionaryHeader;
import com.android.inputmethod.latin.makedict.FormatSpec;
import com.android.inputmethod.latin.makedict.WeightedString;
@@ -171,7 +171,7 @@ public class BinaryDictionaryTests extends AndroidTestCase {
private void testAddTooLongWord(final int formatVersion) {
final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(formatVersion);
final StringBuffer stringBuilder = new StringBuffer();
- for (int i = 0; i < Constants.DICTIONARY_MAX_WORD_LENGTH; i++) {
+ for (int i = 0; i < DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH; i++) {
stringBuilder.append('a');
}
final String validLongWord = stringBuilder.toString();
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
index b104a21f9..a432ca740 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
@@ -17,7 +17,7 @@
package com.android.inputmethod.latin.makedict;
import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.latin.common.Constants;
+import com.android.inputmethod.latin.define.DecoderSpecificConstants;
import com.android.inputmethod.latin.makedict.DictDecoder.DictionaryBufferFactory;
import java.io.File;
@@ -183,7 +183,7 @@ public final class BinaryDictIOUtils {
dictDecoder.readHeader();
int wordPos = 0;
final int wordLen = word.codePointCount(0, word.length());
- for (int depth = 0; depth < Constants.DICTIONARY_MAX_WORD_LENGTH; ++depth) {
+ for (int depth = 0; depth < DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH; ++depth) {
if (wordPos >= wordLen) return FormatSpec.NOT_VALID_WORD;
do {
diff --git a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
index 3cffd001c..a42f0a93d 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
@@ -17,7 +17,7 @@
package com.android.inputmethod.latin.makedict;
import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.latin.common.Constants;
+import com.android.inputmethod.latin.define.DecoderSpecificConstants;
import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
import java.util.ArrayList;
@@ -387,7 +387,7 @@ public final class FusionDictionary implements Iterable<WordProperty> {
final ArrayList<WeightedString> shortcutTargets,
final boolean isNotAWord, final boolean isPossiblyOffensive) {
assert(probabilityInfo.mProbability <= FormatSpec.MAX_TERMINAL_FREQUENCY);
- if (word.length >= Constants.DICTIONARY_MAX_WORD_LENGTH) {
+ if (word.length >= DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH) {
MakedictLog.w("Ignoring a word that is too long: word.length = " + word.length);
return;
}