diff options
Diffstat (limited to 'tests/src')
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java index c42765633..343ab420c 100644 --- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java +++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java @@ -102,13 +102,13 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase { getContext().getCacheDir()); FileUtils.deleteRecursively(file); Map<String, String> attributeMap = new HashMap<String, String>(); - attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_ATTRIBUTE, dictId); - attributeMap.put(FormatSpec.FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, dictId); - attributeMap.put(FormatSpec.FileHeader.DICTIONARY_VERSION_ATTRIBUTE, + attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_KEY, dictId); + attributeMap.put(FormatSpec.FileHeader.DICTIONARY_LOCALE_KEY, dictId); + attributeMap.put(FormatSpec.FileHeader.DICTIONARY_VERSION_KEY, String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()))); - attributeMap.put(FormatSpec.FileHeader.USES_FORGETTING_CURVE_ATTRIBUTE, + attributeMap.put(FormatSpec.FileHeader.USES_FORGETTING_CURVE_KEY, FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE); - attributeMap.put(FormatSpec.FileHeader.HAS_HISTORICAL_INFO_ATTRIBUTE, + attributeMap.put(FormatSpec.FileHeader.HAS_HISTORICAL_INFO_KEY, FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE); if (BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(), FormatSpec.VERSION4, attributeMap)) { diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java index f17596865..20cf9a562 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java @@ -39,13 +39,13 @@ public class BinaryDictUtils { public static DictionaryOptions makeDictionaryOptions(final String id, final String version, final FormatSpec.FormatOptions formatOptions) { final DictionaryOptions options = new DictionaryOptions(new HashMap<String, String>()); - options.mAttributes.put(FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, "en_US"); - options.mAttributes.put(FileHeader.DICTIONARY_ID_ATTRIBUTE, id); - options.mAttributes.put(FileHeader.DICTIONARY_VERSION_ATTRIBUTE, version); + options.mAttributes.put(FileHeader.DICTIONARY_LOCALE_KEY, "en_US"); + options.mAttributes.put(FileHeader.DICTIONARY_ID_KEY, id); + options.mAttributes.put(FileHeader.DICTIONARY_VERSION_KEY, version); if (formatOptions.mHasTimestamp) { - options.mAttributes.put(FileHeader.HAS_HISTORICAL_INFO_ATTRIBUTE, + options.mAttributes.put(FileHeader.HAS_HISTORICAL_INFO_KEY, FileHeader.ATTRIBUTE_VALUE_TRUE); - options.mAttributes.put(FileHeader.USES_FORGETTING_CURVE_ATTRIBUTE, + options.mAttributes.put(FileHeader.USES_FORGETTING_CURVE_KEY, FileHeader.ATTRIBUTE_VALUE_TRUE); } return options; diff --git a/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java index ae08b49d7..93731b3cd 100644 --- a/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtilsTests.java @@ -56,9 +56,9 @@ public class UserHistoryDictIOUtilsTests extends AndroidTestCase private static final String TEST_DICT_FILE_EXTENSION = ".testDict"; private static final HashMap<String, String> HEADER_OPTIONS = new HashMap<String, String>(); static { - HEADER_OPTIONS.put(FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, "en_US"); - HEADER_OPTIONS.put(FileHeader.DICTIONARY_ID_ATTRIBUTE, "test"); - HEADER_OPTIONS.put(FileHeader.DICTIONARY_VERSION_ATTRIBUTE, "1000"); + HEADER_OPTIONS.put(FileHeader.DICTIONARY_LOCALE_KEY, "en_US"); + HEADER_OPTIONS.put(FileHeader.DICTIONARY_ID_KEY, "test"); + HEADER_OPTIONS.put(FileHeader.DICTIONARY_VERSION_KEY, "1000"); } /** |