aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-05 01:37:21 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-05 01:37:21 -0800
commit81c2a2a1aa95e8db6a38af8b2ae500a237c7928e (patch)
tree68bab49ae6aef3af267e32c8efbea68f4c50b266 /tests/src
parent9a7e36acd9bf0be7ddfd1475b29f61b263b76738 (diff)
parentb162911fa4131cf90cd8dbaef325717eec4defa6 (diff)
downloadlatinime-81c2a2a1aa95e8db6a38af8b2ae500a237c7928e.tar.gz
latinime-81c2a2a1aa95e8db6a38af8b2ae500a237c7928e.tar.xz
latinime-81c2a2a1aa95e8db6a38af8b2ae500a237c7928e.zip
am b162911f: Merge "[HD04] Make the locale mandatory."
* commit 'b162911fa4131cf90cd8dbaef325717eec4defa6': [HD04] Make the locale mandatory.
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java6
-rw-r--r--tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
index c41bbd768..7d664c825 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
@@ -28,6 +28,7 @@ import com.android.inputmethod.latin.makedict.FusionDictionary;
import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
import com.android.inputmethod.latin.utils.FileUtils;
+import com.android.inputmethod.latin.utils.LocaleUtils;
import java.io.File;
import java.io.IOException;
@@ -104,15 +105,14 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase {
FileUtils.deleteRecursively(file);
Map<String, String> attributeMap = new HashMap<String, String>();
attributeMap.put(DictionaryHeader.DICTIONARY_ID_KEY, dictId);
- attributeMap.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, dictId);
attributeMap.put(DictionaryHeader.DICTIONARY_VERSION_KEY,
String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));
attributeMap.put(DictionaryHeader.USES_FORGETTING_CURVE_KEY,
DictionaryHeader.ATTRIBUTE_VALUE_TRUE);
attributeMap.put(DictionaryHeader.HAS_HISTORICAL_INFO_KEY,
DictionaryHeader.ATTRIBUTE_VALUE_TRUE);
- if (BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
- FormatSpec.VERSION4, attributeMap)) {
+ if (BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(), FormatSpec.VERSION4,
+ LocaleUtils.constructLocaleFromString(TEST_LOCALE), attributeMap)) {
return file;
} else {
throw new IOException("Empty dictionary " + file.getAbsolutePath()
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
index bab86e546..e21975db6 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
@@ -69,8 +69,8 @@ public class BinaryDictionaryTests extends AndroidTestCase {
file.delete();
file.mkdir();
Map<String, String> attributeMap = new HashMap<String, String>();
- if (BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
- FormatSpec.VERSION4, attributeMap)) {
+ if (BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(), FormatSpec.VERSION4,
+ Locale.ENGLISH, attributeMap)) {
return file;
} else {
throw new IOException("Empty dictionary " + file.getAbsolutePath()